예제 #1
0
        public void ReturnPoints_WhenCalculatingWinnerPointsAfterTheRecursiveGame()
        {
            var sut = new RecursiveCombat(PuzzleData.SAMPLE_DATA);

            sut.PlayTurns(17);
            sut.CalculatePointsForWinner();
            Assert.Equal(291, sut.WinnerPoints);
        }
예제 #2
0
        public void CorrectlyModifyPlayerCards_AfterPlayingFiveRecursiveTurns()
        {
            var sut = new RecursiveCombat(PuzzleData.SAMPLE_DATA);

            sut.PlayTurns(5);
            Assert.Collection(sut.Players[0],
                              p1 => Assert.Equal(9, p1),
                              p2 => Assert.Equal(5, p2),
                              p3 => Assert.Equal(6, p3),
                              p4 => Assert.Equal(4, p4));
            Assert.Collection(sut.Players[1],
                              p1 => Assert.Equal(8, p1),
                              p2 => Assert.Equal(2, p2),
                              p3 => Assert.Equal(7, p3),
                              p4 => Assert.Equal(3, p4),
                              p5 => Assert.Equal(10, p5),
                              p6 => Assert.Equal(1, p6));
        }
예제 #3
0
        public void CorrectlyModifyPlayerCards_AfterPlayingSeventeenRecursiveTurns()
        {
            var sut = new RecursiveCombat(PuzzleData.SAMPLE_DATA);

            sut.PlayTurns(17);
            Assert.Empty(sut.Players[0]);
            Assert.Collection(sut.Players[1],
                              p1 => Assert.Equal(7, p1),
                              p2 => Assert.Equal(5, p2),
                              p3 => Assert.Equal(6, p3),
                              p4 => Assert.Equal(2, p4),
                              p5 => Assert.Equal(4, p5),
                              p6 => Assert.Equal(1, p6),
                              p7 => Assert.Equal(10, p7),
                              p8 => Assert.Equal(8, p8),
                              p9 => Assert.Equal(9, p9),
                              p10 => Assert.Equal(3, p10));
        }