input not correct, now works

This commit is contained in:
hugomanipoud2 2025-05-22 17:37:42 +02:00
parent 99c1f81fee
commit 63c51f3d56
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ public class Move {
if (board.isAPieceThere(toX, toY)){//checking if a piece is at the arrival coordinates if (board.isAPieceThere(toX, toY)){//checking if a piece is at the arrival coordinates
needPieceDeletion(toX, toY); //if a piece is at arrival coord, remove the piece needPieceDeletion(toX, toY); //if a piece is at arrival coord, remove the piece
} }
specialMoves.pawnPromotion(movingPiece); specialMoves.pawnPromotion(movingPiece, toY);
movingPiece.setX(toX); // change coordinates to the new coordinate movingPiece.setX(toX); // change coordinates to the new coordinate
movingPiece.setY(toY); movingPiece.setY(toY);
board.setTurnNb(turnNb + 1); board.setTurnNb(turnNb + 1);