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

Method placeKing

src/main/java/game/Board.java:172–179  ·  view source on GitHub ↗
(final int row, final int col, final Color color)

Source from the content-addressed store, hash-verified

170 }
171
172 public void placeKing(final int row, final int col, final Color color) {
173 final Cell position = Cell.get(row, col);
174 final Piece king = Piece.get(color, position, PieceType.KING);
175 kings[color.ordinal()] = king;
176 pieces.put(position, king);
177 playerPieces.get(color).add(king);
178 updateHashForAddition(king);
179 }
180
181 public void placeKnight(final int row, final int col, final Color color) {
182 final Cell position = Cell.get(row, col);

Callers 15

moveForwardMethod · 0.95
moveAsKingMethod · 0.95
blockedByPawnMethod · 0.95
blockedByEnemyPawnMethod · 0.95
notBlockedByEnemyPawnMethod · 0.95
surroundedByEnemyDiagMethod · 0.95
surroundedByTeamMethod · 0.95
surroundedByEnemyMethod · 0.95

Calls 4

getMethod · 0.95
getMethod · 0.95
updateHashForAdditionMethod · 0.95
getMethod · 0.45

Tested by 15

moveForwardMethod · 0.76
moveAsKingMethod · 0.76
blockedByPawnMethod · 0.76
blockedByEnemyPawnMethod · 0.76
notBlockedByEnemyPawnMethod · 0.76
surroundedByEnemyDiagMethod · 0.76
surroundedByTeamMethod · 0.76
surroundedByEnemyMethod · 0.76