Merge branch 'master' of
https://gitarero.ecam.fr/noa.four/OOP_1B2_Project
This commit is contained in:
parent
ccf5a9a951
commit
617a81b0f9
|
|
@ -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: "");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue