This commit is contained in:
Janet-Doe
2025-05-14 15:56:08 +02:00
parent 046f680937
commit ce977c3b48
3 changed files with 12 additions and 4 deletions

View File

@@ -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;
} }

View File

@@ -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;
}
} }

View File

@@ -60,4 +60,8 @@ public class Move {
return false; return false;
} }
public String toString(){
return "Moved from " + getStart() + " to " + getFinish();
}
} }