This commit is contained in:
Jerome ALTARIBA 2025-04-18 17:15:52 +02:00
commit 9a9b098bf0
1 changed files with 6 additions and 2 deletions

View File

@ -32,7 +32,11 @@ public class Move {
public Piece getCapturedPiece() {
return capturedPiece;
}
public Piece isCapture() {
return capturedPiece;
public boolean isCapture() {
return capturedPiece != null;
}
public String toString() {
return piece + ":("+ fromX + "," + fromY + ")-("+ toX + "," + toY + ")" + ( capturedPiece != null? "capturing "+ capturedPiece: "");
}
}