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

Method surroundedByEnemy

src/test/java/RookTest.java:59–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57 }
58
59 @Test
60 public void surroundedByEnemy() {
61 Board board = new Board();
62 board.placeRook(3, 3, Color.BLACK);
63 board.placePawn(4, 3, Color.WHITE);
64 board.placePawn(3, 4, Color.WHITE);
65 board.placeRook(2, 3, Color.WHITE);
66 board.placeRook(3, 2, Color.WHITE);
67 System.out.println(board);
68 System.out.println(board.getPiece(3, 3).getMoveList(board));
69 Assert.assertEquals(4, board.getPiece(3, 3).getMoveList(board).size());
70 Assert.assertTrue(board.getPiece(3, 3).getMoveList(board).stream().allMatch(c -> c.captureMove));
71 }
72}

Callers

nothing calls this directly

Calls 4

placeRookMethod · 0.95
placePawnMethod · 0.95
getPieceMethod · 0.95
getMoveListMethod · 0.45

Tested by

no test coverage detected