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

Method checkMate

src/test/java/BoardTest.java:56–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54 }
55
56 @Test
57 public void checkMate() {
58 Board board = new Board();
59 board.placeKing(7, 5, Color.WHITE);
60 board.placeRook(7, 2, Color.BLACK);
61 board.placeRook(6, 3, Color.BLACK);
62 board.placeKing(4, 4, Color.BLACK);
63 board.inCheck = true;
64 System.out.println(board);
65 System.out.println(board.getLegalMoves());
66 Assert.assertTrue(board.getLegalMoves().isEmpty());
67 Assert.assertEquals(Integer.MIN_VALUE, board.evaluation(board.getLegalMoves().size()), 0.0001);
68 }
69
70 @Test
71 public void staleMate() {

Callers

nothing calls this directly

Calls 5

placeKingMethod · 0.95
placeRookMethod · 0.95
getLegalMovesMethod · 0.95
evaluationMethod · 0.95
isEmptyMethod · 0.80

Tested by

no test coverage detected