refactor OutputSystem

This commit is contained in:
2025-04-12 11:12:36 +02:00
parent 0d3d77781f
commit 8190090adc
19 changed files with 176 additions and 49 deletions

View File

@@ -1,14 +1,15 @@
package chess.controller;
import chess.controller.event.GameListener;
import chess.model.Game;
public abstract class PlayerCommand extends Command{
public CommandResult undo(Game game, OutputSystem outputSystem) {
public CommandResult undo(Game game, GameListener outputSystem) {
CommandResult result = undoImpl(game, outputSystem);
game.updateLastMove();
return result;
}
protected abstract CommandResult undoImpl(Game game, OutputSystem outputSystem);
protected abstract CommandResult undoImpl(Game game, GameListener outputSystem);
}