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

Method blockedByPawn

src/test/java/KingTest.java:27–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25 }
26
27 @Test
28 public void blockedByPawn() {
29 Board board = new Board();
30 board.placeKing(3, 3, Color.BLACK);
31 board.placePawn(4, 3, Color.BLACK);
32 board.placeKing(7, 7, Color.WHITE);
33 System.out.println(board);
34 System.out.println(board.getPiece(3, 3).getMoveList(board));
35 Assert.assertEquals(7, board.getPiece(3, 3).getMoveList(board).size());
36 Assert.assertTrue(board.getPiece(3, 3).getMoveList(board).stream().noneMatch(c -> c.captureMove));
37 }
38
39 @Test
40 public void blockedByEnemyPawn() {

Callers

nothing calls this directly

Calls 4

placeKingMethod · 0.95
placePawnMethod · 0.95
getPieceMethod · 0.95
getMoveListMethod · 0.45

Tested by

no test coverage detected