if king or rook moves the castling doesnt work !

This commit is contained in:
hugomanipoud2 2025-05-22 19:43:17 +02:00
parent 3fb0209a63
commit 8ded4954b8
1 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ public class Move {
specialMoves.pawnPromotion(movingPiece, toY);
movingPiece.setX(toX); // change coordinates to the new coordinate
movingPiece.setY(toY);
specialMoves.setCastlingVariable(movingPiece);
board.setTurnNb(turnNb + 1);
}
break;