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

Method placePawn

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

Source from the content-addressed store, hash-verified

138 }
139
140 public void placePawn(final int row, final int col, final Color color) {
141 final Cell position = Cell.get(row, col);
142 final Piece pawn = Piece.get(color, position, PieceType.PAWN);
143 pieces.put(position, pawn);
144 playerPieces.get(color).add(pawn);
145 updateHashForAddition(pawn);
146 }
147
148 public void placeRook(final int row, final int col, final Color color) {
149 final Cell position = Cell.get(row, col);

Callers 15

moveForwardMethod · 0.95
moveForwardDoubleMethod · 0.95
canCaptureMethod · 0.95
canCaptureBlackMethod · 0.95
canCaptureEnPassantMethod · 0.95
blockedByPawnMethod · 0.95
blockedByEnemyPawnMethod · 0.95
surroundedByPiecesMethod · 0.95

Calls 4

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

Tested by 15

moveForwardMethod · 0.76
moveForwardDoubleMethod · 0.76
canCaptureMethod · 0.76
canCaptureBlackMethod · 0.76
canCaptureEnPassantMethod · 0.76
blockedByPawnMethod · 0.76
blockedByEnemyPawnMethod · 0.76
surroundedByPiecesMethod · 0.76