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

Method complexPosition

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

Source from the content-addressed store, hash-verified

58 }
59
60 @Test
61 public void complexPosition() {
62 Board board = Board.getBoard("r4rk1/1bp1q1p1/1p5p/3n4/p2Ppp2/2P3QN/PPB2PPP/R3R1K1 w - - 0 22");
63 System.out.println(board);
64 Engine engine = new Engine();
65 final OutCome bestMove = engine.iterativeDeepening(board, 10);
66 System.out.println(bestMove.getMove());
67 System.out.println(bestMove.getScore());
68 board.makeMove(bestMove.getMove());
69 System.out.println(board);
70 Assert.assertEquals(Cell.get(5, 6), bestMove.getMove().target);
71 Assert.assertTrue(bestMove.getMove().piece.sameType(PieceType.QUEEN));
72 System.out.println("NODES: " + Engine.nodesEvaluated + " TRANSPOSITIONS: " + engine.transpositionTable.size());
73 }
74
75 @Test
76 public void winQueen() {

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected