public void AddActivePlayer(Player player, int index) { player.Team = this; ActivePlayers.Insert(index, player); if (metadata.NumActivePlayers.HasValue) { if (ActivePlayers.Count > metadata.NumActivePlayers.Value) { Player end = ActivePlayers[ActivePlayers.Count - 1]; ActivePlayers.RemoveAt(ActivePlayers.Count - 1); BenchPlayers.Insert(0, end); } } }