public void ThreeInARightToLeftDiagonalWins() { var naughts = new PrepopulatedPlayerStub(new[] { new BoardPosition(1, 3), new BoardPosition(2, 2), new BoardPosition(3, 1), }); var crosses = new PrepopulatedPlayerStub(new[] { new BoardPosition(1, 2), new BoardPosition(3, 2), }); var game = new TicTacToeGame(naughts, crosses); game.Play(); Assert.That(game.IsFinished); Assert.That(game.Winner, Is.EqualTo(game.Naughts)); }
public void WhenBoardIsFullButNobodyHasWonPlayersDraw() { var naughts = new PrepopulatedPlayerStub(new[] { new BoardPosition(1, 1), new BoardPosition(1, 3), new BoardPosition(2, 1), new BoardPosition(3, 2), new BoardPosition(3, 3), }); var crosses = new PrepopulatedPlayerStub(new[] { new BoardPosition(1, 2), new BoardPosition(2, 2), new BoardPosition(2, 3), new BoardPosition(3, 1), }); var game = new TicTacToeGame(naughts, crosses); game.Play(); Assert.That(game.IsFinished); Assert.That(game.Winner, Is.EqualTo(null)); }