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

Method surroundedByTeam

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

Source from the content-addressed store, hash-verified

128 }
129
130 @Test
131 public void surroundedByTeam() {
132 Board board = new Board();
133 board.placeKing(3, 3, Color.WHITE);
134 board.placePawn(4, 4, Color.WHITE);
135 board.placePawn(2, 2, Color.WHITE);
136 board.placeRook(4, 2, Color.WHITE);
137 board.placeRook(2, 4, Color.WHITE);
138 board.placePawn(4, 3, Color.WHITE);
139 board.placePawn(3, 4, Color.WHITE);
140 board.placeRook(2, 3, Color.WHITE);
141 board.placeRook(3, 2, Color.WHITE);
142 board.placeKing(7, 7, Color.BLACK);
143 System.out.println(board);
144 System.out.println(board.getPiece(3, 3).getMoveList(board));
145 Assert.assertTrue(board.getPiece(3, 3).getMoveList(board).isEmpty());
146 }
147
148 @Test
149 public void surroundedByEnemy() {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected