public void RunTest() { List<Competitor> competitors = new List<Competitor>(); competitors.Add(new Competitor() { Name = "A", TheoreticalRating = 90 }); competitors.Add(new Competitor() { Name = "B", TheoreticalRating = 80 }); competitors.Add(new Competitor() { Name = "C", TheoreticalRating = 70 }); competitors.Add(new Competitor() { Name = "D", TheoreticalRating = 60 }); int initialRank = 1; foreach (Competitor competitor in competitors) { competitor.InitialRank = initialRank++; } TournamentRound round = new TournamentRound(new KoTRS(1), new NonRandomMs()); round.Run(competitors); foreach (Match match in round.Matches) { Trace.WriteLine(string.Format("Match {0}: Winner {1}, Loser {2}", match.RunSequence, match.Winner.Name, match.Loser.Name)); } }
public void RunTest_OddCompetitors() { List<Competitor> competitors = Helpers.CompetitorListHelper.GetStandardCompetitors(7); TournamentRound round = new TournamentRound(new KoTRS(1), new NonRandomMs()); round.Run(competitors); }
public void RunTest_RoundRobin() { List<Competitor> competitors = Helpers.CompetitorListHelper.GetStandardCompetitors(7); TournamentRound round = new TournamentRound(new RrTRS(), new NonRandomMs()); round.Run(competitors); foreach (Match match in round.Matches) { Trace.WriteLine(string.Format("Match {0}: Winner {1}, Loser {2}", match.RunSequence, match.Winner.Name, match.Loser.Name)); } }