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

Method staleMate

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

Source from the content-addressed store, hash-verified

68 }
69
70 @Test
71 public void staleMate() {
72 Board board = new Board();
73 board.placeKing(7, 5, Color.WHITE);
74 board.placeRook(6, 2, Color.BLACK);
75 board.placeRook(3, 4, Color.BLACK);
76 board.placeKing(7, 7, Color.BLACK);
77 System.out.println(board);
78 System.out.println(board.getLegalMoves());
79 Assert.assertTrue(board.getLegalMoves().isEmpty());
80 Assert.assertEquals(0, board.evaluation(board.getLegalMoves().size()), 0.000001);
81 }
82
83 @Test
84 public void checkMateIn1() {

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