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

Method surroundedByTeam

src/test/java/QueenTest.java:98–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96 }
97
98 @Test
99 public void surroundedByTeam() {
100 Board board = new Board();
101 board.placeQueen(3, 3, Color.WHITE);
102 board.placePawn(4, 4, Color.WHITE);
103 board.placePawn(2, 2, Color.WHITE);
104 board.placeRook(4, 2, Color.WHITE);
105 board.placeRook(2, 4, Color.WHITE);
106 board.placePawn(4, 3, Color.WHITE);
107 board.placePawn(3, 4, Color.WHITE);
108 board.placeRook(2, 3, Color.WHITE);
109 board.placeRook(3, 2, Color.WHITE);
110 System.out.println(board);
111 System.out.println(board.getPiece(3, 3).getMoveList(board));
112 Assert.assertTrue(board.getPiece(3, 3).getMoveList(board).isEmpty());
113 }
114
115 @Test
116 public void surroundedByEnemy() {

Callers

nothing calls this directly

Calls 6

placeQueenMethod · 0.95
placePawnMethod · 0.95
placeRookMethod · 0.95
getPieceMethod · 0.95
isEmptyMethod · 0.80
getMoveListMethod · 0.45

Tested by

no test coverage detected