44 lines
804 B
Java
44 lines
804 B
Java
package backend;
|
|
|
|
public class Move {
|
|
private int fromX;
|
|
private int fromY;
|
|
private int toX;
|
|
private int toY;
|
|
private Piece pieceMoved;
|
|
private Piece pieceCaptured;
|
|
|
|
public Move(int fromX, int fromY, int toX, int toY, Piece pieceMoved, Piece pieceCaptured) {
|
|
this.fromX = fromX;
|
|
this.fromY = fromY;
|
|
this.toX = toX;
|
|
this.toY = toY;
|
|
this.pieceMoved = pieceMoved;
|
|
this.pieceCaptured = pieceCaptured;
|
|
}
|
|
|
|
public int getFromX() {
|
|
return fromX;
|
|
}
|
|
|
|
public int getFromY() {
|
|
return fromY;
|
|
}
|
|
|
|
public int getToX() {
|
|
return toX;
|
|
}
|
|
|
|
public int getToY() {
|
|
return toY;
|
|
}
|
|
|
|
public Piece getPieceMoved() {
|
|
return pieceMoved;
|
|
}
|
|
|
|
public Piece getPieceCaptured() {
|
|
return pieceCaptured;
|
|
}
|
|
}
|