public string

This commit is contained in:
MSI 2025-04-18 17:15:12 +02:00
parent a739fa2928
commit d106b50d24
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: "");
}
}