void PrintPlayersToConsole(PlayersContainer players) { if (players.Count == 0) { Console.WriteLine("Tokių žaidėjų nėra"); } else { Console.WriteLine(players.GetPlayer(0).Team); for (int i = 0; i < players.Count; i++) { Console.WriteLine(players.GetPlayer(i)); } } }
void BranchAdded(BranchesContainer branches, PlayersContainer basketball, PlayersContainer football) { for (int i = 0; i < branches.Count; i++) { for (int g = 0; g < basketball.Count; g++) { if (branches.GetBranch(i).Team == basketball.GetPlayer(g).Team) { branches.branches[i].Basketballists.AddPlayer(basketball.GetPlayer(g)); } } for (int g = 0; g < football.Count; g++) { if (branches.GetBranch(i).Team == football.GetPlayer(g).Team) { branches.branches[i].Footballists.AddPlayer(football.GetPlayer(g)); } } } }