| 28 | } |
| 29 | |
| 30 | @Test |
| 31 | public void mateInThree() { |
| 32 | Board board = Board.getBoard("7k/4K1pp/7N/8/8/8/8/B7 w - - 0 1"); |
| 33 | System.out.println(board); |
| 34 | Engine engine = new Engine(); |
| 35 | final Evaluation bestMove = engine.minMax(board, 5, 5); |
| 36 | System.out.println(bestMove.getMove()); |
| 37 | System.out.println(bestMove.getScore()); |
| 38 | board.makeMove(bestMove.getMove()); |
| 39 | System.out.println(board); |
| 40 | Assert.assertEquals(bestMove.getMove().target, Cell.get(5, 5)); |
| 41 | Assert.assertTrue(bestMove.getMove().piece.sameType(PieceType.BISHOP)); |
| 42 | System.out.println("NODES: " + Engine.nodesEvaluated + " TRANSPOSITIONS: " + engine.transpositionTable.size()); |
| 43 | } |
| 44 | |
| 45 | @Test |
| 46 | public void mateInTwo() { |