public Team(string[] args) { foreach (var arg in args) { if (arg.ToLower().StartsWith("teamname=")) { var results = arg.Split(new string[] { "=" }, StringSplitOptions.RemoveEmptyEntries); m_teamName = results[1]; } if (arg.ToLower().StartsWith("strategy=")) { var results = arg.Split(new string[] { "=" }, StringSplitOptions.RemoveEmptyEntries); m_stratgey = (Strategies)Enum.Parse(typeof(Strategies), results[1]); } } if (m_teamName is null) { m_teamName = SoccerParams.m_teamName; } m_coach = new Coach(); m_teamFormation = new Formation_4_4_2(); m_playerList = m_teamFormation.InitTeam(m_stratgey, this, m_coach); }
public Team(string[] args) { foreach (var arg in args) { if (arg.ToLower().StartsWith("teamname=")) { var results = arg.Split(new string[] { "=" }, StringSplitOptions.RemoveEmptyEntries); m_teamName = results[1]; } } if (m_teamName is null) { m_teamName = SoccerParams.m_teamName; } m_coach = new Coach(); m_teamFormation = new EnglandFormation(); m_playerList = m_teamFormation.InitTeam(this, m_coach); }