- quick modifications comments

This commit is contained in:
willo 2025-05-16 14:55:27 +02:00
parent d44c79b817
commit ed5ef9f9da
2 changed files with 12 additions and 2 deletions

View File

@ -37,7 +37,7 @@ public class MovementCapabilities {
*/ */
// to check if each condition is valid in the console // to check if each condition is valid in the console
if (isPawn && isOpp && movedTwo && sameX && sameY) { if (isPawn && isOpp && movedTwo && sameX && sameY) {
System.out.println(" En passant conditions met!"); System.out.println(" En passant conditions met");
board.movePiece(currentX, currentY, x, y); board.movePiece(currentX, currentY, x, y);
//board.setPiece(false, null, x, currentY); // DIDN'T WORK --> instead used removePiece method //board.setPiece(false, null, x, currentY); // DIDN'T WORK --> instead used removePiece method
board.removePiece(x, currentY); board.removePiece(x, currentY);
@ -47,6 +47,16 @@ public class MovementCapabilities {
} }
return false; return false;
} }
public boolean castling(Piece king, int x, int y, Board board) {
if (king.getType()!= PieceType.King|| king.getdidMove()) {
return false;
}
return false;
}
} }

View File

@ -39,7 +39,7 @@ public class Piece {
return white; return white;
} }
public boolean didMove() { // added getter public boolean getdidMove() { // added getter
return didMove; return didMove;
} }