dev #12

Merged
Persson-dev merged 44 commits from dev into main 2025-05-17 15:05:24 +00:00
3 changed files with 12 additions and 4 deletions
Showing only changes of commit ce977c3b48 - Show all commits

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();
}
} }