big refactor

This commit is contained in:
2025-04-19 12:56:08 +02:00
parent 031d3d94ec
commit 13b61ad71c
10 changed files with 366 additions and 264 deletions

View File

@@ -2,6 +2,7 @@ package chess.controller;
import chess.controller.Command.CommandResult;
import chess.controller.commands.UndoCommand;
import chess.controller.event.AsyncGameDispatcher;
import chess.controller.event.GameDispatcher;
import chess.controller.event.GameListener;
import chess.model.Game;
@@ -17,7 +18,7 @@ public class CommandExecutor {
}
public CommandExecutor(Game game) {
this(game, new GameDispatcher());
this(game, new AsyncGameDispatcher());
}
public CommandExecutor(Game game, GameDispatcher dispatcher) {
@@ -109,6 +110,6 @@ public class CommandExecutor {
}
public void close() {
this.dispatcher.stopService();
this.dispatcher.close();
}
}