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,7 +1,7 @@
package chess.controller.commands;
import chess.controller.OutputSystem;
import chess.controller.PlayerCommand;
import chess.controller.event.GameListener;
import chess.model.ChessBoard;
import chess.model.Color;
import chess.model.Coordinate;
@@ -19,7 +19,7 @@ public class CastlingCommand extends PlayerCommand {
}
@Override
public CommandResult execute(Game game, OutputSystem outputSystem) {
public CommandResult execute(Game game, GameListener outputSystem) {
final ChessBoard board = game.getBoard();
// we must promote the pending pawn before
@@ -53,7 +53,7 @@ public class CastlingCommand extends PlayerCommand {
}
@Override
protected CommandResult undoImpl(Game game, OutputSystem outputSystem) {
protected CommandResult undoImpl(Game game, GameListener outputSystem) {
game.getBoard().undoMove(this.kingMove, null);
game.getBoard().undoMove(this.rookMove, null);