MCPcopy Create free account
hub / github.com/coding-parrot/chess-engine / hardMateIn3

Method hardMateIn3

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

Source from the content-addressed store, hash-verified

99 }
100
101 @Test
102 public void hardMateIn3() {
103 Board board = Board.getBoard("8/8/2P1Q3/3P3R/3k4/8/2K5/8 w - - 0 1");
104 System.out.println(board);
105 Engine engine = new Engine();
106 final OutCome bestMove = engine.iterativeDeepening(board, 20);
107 System.out.println(bestMove.getMove());
108 Assert.assertEquals(Cell.get(6, 5), bestMove.getMove().target);
109 Assert.assertTrue(bestMove.getMove().piece.sameType(PieceType.QUEEN));
110 Assert.assertEquals(Integer.MIN_VALUE, bestMove.getScore(), 0.000001);
111 System.out.println("NODES: " + Engine.nodesEvaluated + " TRANSPOSITIONS: " + engine.transpositionTable.size());
112 }
113
114 @Test
115 public void mateIn4() {

Callers

nothing calls this directly

Calls 6

getBoardMethod · 0.95
iterativeDeepeningMethod · 0.95
getMoveMethod · 0.95
getMethod · 0.95
getScoreMethod · 0.95
sameTypeMethod · 0.80

Tested by

no test coverage detected