few docstrings

This commit is contained in:
hugomanipoud2 2025-05-22 20:28:57 +02:00
parent 18c659e93d
commit 2fa708862d
1 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ public class Move {
needPieceDeletion(toX, toY); //if a piece is at arrival coord, remove the piece
}
specialMoves.pawnPromotion(movingPiece, toY);
specialMoves.setCastlingVariable(movingPiece, toX, toY);
specialMoves.castling(movingPiece, toX, toY);
movingPiece.setX(toX); // change coordinates to the new coordinate
movingPiece.setY(toY);
board.setTurnNb(turnNb + 1);
@ -369,14 +369,14 @@ public boolean isKingMoveValid(int x, int y, boolean color, int selectX, int se
}
if (color == true) { // for white king
if ((selectX == x - 3 && selectY == y)) {
return specialMoves.shortCastle(myPiece);
return specialMoves.shortCastleHighlight(myPiece);
}
// else if ((selectX == x + 4 && selectY == y)) {
// return specialMoves.longCastle(myPiece);
// }
}else {
if ((selectX == x - 3 && selectY == y)) {
return specialMoves.shortCastle(myPiece);
return specialMoves.shortCastleHighlight(myPiece);
}
}
return false;