MCPcopy Index your code
hub / github.com/coding-parrot/chess-engine / mateInThree

Method mateInThree

src/test/java/MinMaxTest.java:30–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 7

getBoardMethod · 0.95
minMaxMethod · 0.95
getMoveMethod · 0.95
getScoreMethod · 0.95
makeMoveMethod · 0.95
getMethod · 0.95
sameTypeMethod · 0.80

Tested by

no test coverage detected