Merge branch 'master' of

https://gitarero.ecam.fr/noa.four/OOP_1B2_Project
This commit is contained in:
Noa FOUR 2025-04-18 17:21:22 +02:00
parent ccf5a9a951
commit 617a81b0f9
1 changed files with 3 additions and 2 deletions

View File

@ -6,7 +6,7 @@ public class Move {
private int toX, toY;
private Piece capturedPiece;
public Move ( Piece piece, int fromX, int fromY, int toX, int toY, Piece captured) {
public Move ( Piece piece, int fromX, int fromY, int toX, int toY, Piece capturedPiece){
this.piece = piece;
this.fromX = fromX;
this.fromY = fromY;
@ -36,7 +36,8 @@ public class Move {
return capturedPiece != null;
}
public String toString() {
return piece + ":("+ fromX + "," + fromY + ")-("+ toX + "," + toY + ")" + ( capturedPiece != null? "capturing "+ capturedPiece: "");
return piece + ":("+ fromX + "," + fromY + ")-("+ toX + "," + toY + ")" +
( capturedPiece != null? "capturing "+ capturedPiece: "");
}
}