package Game;
/**
* Command object to store the game's move history for display, export to PGN, and undo function.
*/
public class Command{
int sourceX;
int sourceY;
int destX;
int destY;
Player player;
boolean hasMoved;
public String histStr;
Command(int sourceX, int sourceY, int destX, int destY, Player player, boolean hasMoved, String histStr){
this.sourceX = sourceX;
this.sourceY = sourceY;
this.destX = destX;
this.destY = destY;
this.player = player;
this.hasMoved = hasMoved;
this.histStr = histStr;
}
public int getSourceX() {
return sourceX;
}
public int getSourceY() {
return sourceY;
}
public boolean isHasMoved() {
return hasMoved;
}
public Player getPlayer() {
return player;
}
public int getDestY() {
return destY;
}
public int getDestX() {
return destX;
}
}