- quick modifications comments
This commit is contained in:
parent
d44c79b817
commit
ed5ef9f9da
|
|
@ -37,7 +37,7 @@ public class MovementCapabilities {
|
|||
*/
|
||||
// to check if each condition is valid in the console
|
||||
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.setPiece(false, null, x, currentY); // DIDN'T WORK --> instead used removePiece method
|
||||
board.removePiece(x, currentY);
|
||||
|
|
@ -47,6 +47,16 @@ public class MovementCapabilities {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public boolean castling(Piece king, int x, int y, Board board) {
|
||||
if (king.getType()!= PieceType.King|| king.getdidMove()) {
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class Piece {
|
|||
return white;
|
||||
}
|
||||
|
||||
public boolean didMove() { // added getter
|
||||
public boolean getdidMove() { // added getter
|
||||
return didMove;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue