public void CreateSemi() { SortTeamsPoints(); if (RankingTeam.Count >= 4) { Match match = new Match() { TeamA = RankingTeam[0], TeamB = RankingTeam[1], RefereeList = RefereeList, GameTypes = GameTypes, MatchRanks = MatchRanks.Semifinal }; MatchPlanned.Add(match); match = new Match() { TeamA = RankingTeam[2], TeamB = RankingTeam[3], RefereeList = RefereeList, GameTypes = GameTypes, MatchRanks = MatchRanks.Semifinal }; MatchPlanned.Add(match); WasSemiCreated = true; } }
public void CreateGroupStage() { if (TeamList.Count >= 2) { int i = 0; int j; Match match; foreach (var teamA in TeamList.List) { j = 0; foreach (var teamB in TeamList.List) { if (j > i) { match = new Match() { TeamA = teamA, TeamB = teamB, RefereeList = RefereeList, GameTypes = GameTypes, MatchRanks = MatchRanks.GroupStage }; MatchPlanned.Add(match); } j++; } i++; } WasGroupStageCreated = true; } }
public void CreateFinal() { SortTeamsPoints(); if (RankingTeam.Count >= 2) { FinalA = RankingTeam[0]; FinalB = RankingTeam[1]; Match match = new Match() { TeamA = FinalA, TeamB = FinalB, RefereeList = RefereeList, GameTypes = GameTypes, MatchRanks = MatchRanks.Final }; MatchPlanned.Add(match); WasFinalCreated = true; } }