diff --git a/js/controllers/GameController.js b/js/controllers/GameController.js index 3a76727..3379bc3 100644 --- a/js/controllers/GameController.js +++ b/js/controllers/GameController.js @@ -105,7 +105,8 @@ export class GameController { captured = SpecialMoves.executeEnPassant(this.board, piece, toRow, toCol); } else { // Normal move - captured = this.board.movePiece(fromRow, fromCol, toRow, toCol); + const moveResult = this.board.movePiece(fromRow, fromCol, toRow, toCol); + captured = moveResult.captured; // Check for promotion if (specialMoveType === 'promotion' || (piece.type === 'pawn' && piece.canPromote())) {