Ejemplo n.º 1
0
        public List <PlayerReference> GetAdvancingPlayerReferences()
        {
            if (GetPlayState() != PlayStateEnum.Finished)
            {
                return(null);
            }

            return(AdvancingPlayersSolver.FetchFrom(this));
        }
Ejemplo n.º 2
0
        public void ThenAdvancingPlayersFromGroupFromFirstToLastShouldBeExactly(int groupIndex, string commaSeparatedPlayerNames)
        {
            GroupBase     group = createdGroups[groupIndex];
            List <string> expectedPlayerNameOrder = StringUtility.ToStringList(commaSeparatedPlayerNames, ",");

            List <PlayerReference> playerReferences = AdvancingPlayersSolver.FetchFrom(group);

            playerReferences.Should().HaveCount(expectedPlayerNameOrder.Count);
            for (int index = 0; index < playerReferences.Count; ++index)
            {
                playerReferences[index].Name.Should().Be(expectedPlayerNameOrder[index]);
            }
        }
Ejemplo n.º 3
0
        public void ThenAdvancingPlayersFromRoundFromFirstToLastShouldBe(int roundIndex, string commaSeparatedPlayerNames)
        {
            RoundBase     round = createdRounds[roundIndex];
            List <string> expectedPlayerNameOrder = StringUtility.ToStringList(commaSeparatedPlayerNames, ",");

            List <PlayerReference> playerReferences = AdvancingPlayersSolver.FetchFrom(round);

            playerReferences.Should().HaveCount(expectedPlayerNameOrder.Count);
            for (int index = 0; index < playerReferences.Count; ++index)
            {
                playerReferences[index].Name.Should().Be(expectedPlayerNameOrder[index]);
            }
        }
Ejemplo n.º 4
0
        public void ThenAdvancingPlayersInGroupIsExactly(int groupIndex, string commaSeparatedPlayerNames)
        {
            GroupBase     group       = createdGroups[groupIndex];
            List <string> playerNames = StringUtility.ToStringList(commaSeparatedPlayerNames, ",");

            List <PlayerReference> playerReferences = AdvancingPlayersSolver.FetchFrom(group);

            playerReferences.Should().HaveCount(playerNames.Count);
            foreach (string playerName in playerNames)
            {
                playerReferences.FirstOrDefault(playerReference => playerReference.Name == playerName).Should().NotBeNull();
            }
        }