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

Method blockedByPawn

src/test/java/KnightTest.java:25–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

placeKnightMethod · 0.95
placePawnMethod · 0.95
getPieceMethod · 0.95
getMoveListMethod · 0.45

Tested by

no test coverage detected