using System; using System.Text; namespace TeslaConsole.RedPlanet; [Serializable] internal class RPFootballPlayer : RPPlayer { private readonly string mTeamKey; private readonly string mPositionKey; public string TeamKey => mTeamKey; public string PositionKey => mPositionKey; public RPFootballPlayer(string podHostAddress, string name, string vehicleKey, string teamKey, string positionKey, string colorKey) : base(podHostAddress, name, vehicleKey, colorKey, "None") { if (teamKey == null) { throw new ArgumentNullException("teamKey"); } if (positionKey == null) { throw new ArgumentNullException("positionKey"); } mTeamKey = teamKey; mPositionKey = positionKey; } protected sealed override void AppendMissionSpecificPilot(int index, StringBuilder sb) { sb.AppendFormat("team=team::{0}\n", mTeamKey); sb.AppendFormat("position={0}\n", mPositionKey); } }