short castle done and working, finishing long castle

This commit is contained in:
hugomanipoud2 2025-05-22 20:52:55 +02:00
parent 2fa708862d
commit 925681e178
1 changed files with 5 additions and 5 deletions

View File

@ -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.shortCastleHighlight(myPiece);
return specialMoves.wShortCastleHighlight(myPiece);
}
else if ((selectX == x + 4 && selectY == y)) {
return specialMoves.wLongCastleHighlight(myPiece);
}
// else if ((selectX == x + 4 && selectY == y)) {
// return specialMoves.longCastle(myPiece);
// }
}else {
if ((selectX == x - 3 && selectY == y)) {
return specialMoves.shortCastleHighlight(myPiece);
return specialMoves.bShortCastleHighlight(myPiece);
}
}
return false;