public void MakeWinningMove() { var naughts = new TurnByTurnPlayerStub(); var crosses = new MiniMaxPlayer(naughts); var board = new TicTacToeBoard(new ITicTacToePlayer[] { naughts, null, crosses, null, naughts, null, naughts, null, crosses }); var position = crosses.PlayTurn(board); Assert.That(position, Is.EqualTo(new BoardPosition(2, 3))); }
public void FindBestStartingMove() { var naughts = new TurnByTurnPlayerStub(); var crosses = new MiniMaxPlayer(naughts); var board = new TicTacToeBoard(new ITicTacToePlayer[] { null, null, null, null, null, null, null, null, null }); var position = crosses.PlayTurn(board); Assert.That(position, Is.EqualTo(new BoardPosition(1, 1))); }