feat: add undo
This commit is contained in:
@@ -24,6 +24,10 @@ public class CommandExecutor {
|
||||
assert result != CommandResult.Moved || command instanceof PlayerCommand;
|
||||
|
||||
processResult(command, result);
|
||||
|
||||
if (command instanceof PlayerCommand playerCommand)
|
||||
this.game.addAction(playerCommand);
|
||||
|
||||
command.postExec(game, outputSystem);
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user