recover the piece
This commit is contained in:
parent
cc591ab120
commit
4f985c9abd
|
|
@ -4,6 +4,7 @@ public class Move {
|
||||||
private Piece piece;
|
private Piece piece;
|
||||||
private int fromX, fromY;
|
private int fromX, fromY;
|
||||||
private int toX, toY;
|
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 captured) {
|
||||||
this.piece = piece;
|
this.piece = piece;
|
||||||
|
|
@ -11,6 +12,7 @@ public class Move {
|
||||||
this.fromY = fromY;
|
this.fromY = fromY;
|
||||||
this.toX = toX;
|
this.toX = toX;
|
||||||
this.toY = toY;
|
this.toY = toY;
|
||||||
|
this.capturedPiece = capturedPiece;
|
||||||
}
|
}
|
||||||
public Piece getPiece() {
|
public Piece getPiece() {
|
||||||
return piece;
|
return piece;
|
||||||
|
|
@ -27,5 +29,10 @@ public class Move {
|
||||||
public int getToY() {
|
public int getToY() {
|
||||||
return toY;
|
return toY;
|
||||||
}
|
}
|
||||||
// deleted the capturedPiece
|
public Piece getCapturedPiece() {
|
||||||
|
return capturedPiece;
|
||||||
|
}
|
||||||
|
public boolean isCapture() {
|
||||||
|
return capturedPiece;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue