Beispiel #1
0
        public void SetNextStone_WithValidArguments_DoesNotSwitchCurrentPlayer([Values(Player.One, Player.Two)] Player player)
        {
            var objectUnderTest = new SetStoneGameState(new PlayingBoard(), this._sampleStone, player);
            var result          = objectUnderTest.SetNextStoneTo(1, 1);

            result.CurrentPlayer.Should().Be(objectUnderTest.CurrentPlayer);
        }
Beispiel #2
0
        public void SetNextStoneTo_WithUnsetStone_ReturnsAGameStateWithTheStoneSetToTheGivenPositionAndNoNextStoneSelected()
        {
            var objectUnderTest = new SetStoneGameState(new PlayingBoard(), this._sampleStone, Player.One);
            var result          = objectUnderTest.SetNextStoneTo(1, 1);

            result.Should().NotBeNull();
            result.PlayingBoard.Should().NotBeNull();
            result.PlayingBoard.GetStone(1, 1).Should().Be(this._sampleStone);
            result.NextStone.Should().BeNull();
        }