public void GenerateResultTest()
        {
            RrKo1aTS target = new RrKo1aTS(2, 2);
            int tournamentRunSequence = 1;
            MatchStrategy matchStrategy = new NonRandomMs();
            List<Competitor> competitors = Helpers.CompetitorListHelper.GetStandardCompetitors(8);
            CompetitorRanks ranks = target.GenerateResult(tournamentRunSequence, matchStrategy, competitors);

            int i = 1;
            foreach (KeyValuePair<Competitor, int> rank in ranks.OrderBy(x => x.Key.Name))
            {
                Assert.AreEqual(i++, rank.Value);
            }
        }
        public void RunTest_RrKo1aTS()
        {
            var competitors = Helpers.CompetitorListHelper.GetStandardCompetitors(8);

            TournamentStrategy tournamentStrategy = new RrKo1aTS(2, 2);
            MatchStrategy matchStrategy = new SimpleRandomMs();

            Study study = new Study(tournamentStrategy, matchStrategy, false);
            study.Run(competitors, _numberOfTournamentIterations);

            DisplayTestResults(tournamentStrategy, matchStrategy, study);
        }
Пример #3
0
        public void StudyRrKo1a()
        {
            List<Competitor> competitors = Helpers.CompetitorListHelper.GetEvenlySpacedCompetitors(_numberOfCompetitors);

            TournamentStrategy tournamentStrategy = new RrKo1aTS(2, 2);
            MatchStrategy matchStrategy = new SimpleRandomMs();

            RunStudy(competitors, tournamentStrategy, matchStrategy);
        }