debug
This commit is contained in:
@@ -7,14 +7,14 @@ public abstract class Command {
|
|||||||
|
|
||||||
public enum CommandResult {
|
public enum CommandResult {
|
||||||
/**
|
/**
|
||||||
* The command was successfull. Should update display and switch player turn.
|
* The command was successful. Should update display and switch player turn.
|
||||||
*/
|
*/
|
||||||
Moved,
|
Moved,
|
||||||
/** The command was successfull. Should not update anything */
|
/** The command was successful. Should not update anything */
|
||||||
NotMoved,
|
NotMoved,
|
||||||
/** The command was successfull. Should only update display */
|
/** The command was successful. Should only update display */
|
||||||
ActionNeeded,
|
ActionNeeded,
|
||||||
/** The command was not successfull */
|
/** The command was not successful */
|
||||||
NotAllowed;
|
NotAllowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,4 +38,8 @@ public class GetAllowedMovesPieceCommand extends Command {
|
|||||||
public List<Coordinate> getDestinations() {
|
public List<Coordinate> getDestinations() {
|
||||||
return destinations;
|
return destinations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String toString(){
|
||||||
|
return "From position " + start + " to " + destinations;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,4 +60,8 @@ public class Move {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String toString(){
|
||||||
|
return "Moved from " + getStart() + " to " + getFinish();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user