예제 #1
0
        public void CanDetectWhenRoundIsNotTheFirstOne()
        {
            RoundBase firstRound  = tournament.AddRoundRobinRound();
            RoundBase secondRound = tournament.AddRoundRobinRound();

            bool isFirstRound = secondRound.IsFirstRound();

            isFirstRound.Should().BeFalse();
        }
예제 #2
0
        private static void CheckWhetherRoundIsFilledUpToCapacityWithPlayers(RoundBase round)
        {
            int expectedParticipantCount = round.GetExpectedParticipantCount();
            int playerCapacityInRound    = round.Groups.Count * round.PlayersPerGroupCount;

            bool doesNotFillAllGroupsEvenly = (expectedParticipantCount - playerCapacityInRound) != 0;

            if (doesNotFillAllGroupsEvenly)
            {
                if (round.IsFirstRound())
                {
                    round.Tournament.TournamentIssueReporter.Report(round, TournamentIssues.NotFillingAllGroupsWithPlayers);
                }
                else
                {
                    round.Tournament.TournamentIssueReporter.Report(round, TournamentIssues.RoundDoesNotSynergizeWithPreviousRound);
                }
            }
        }