fix console

This commit is contained in:
2025-04-18 10:33:10 +02:00
parent 30eb12145d
commit b83726925e
2 changed files with 7 additions and 10 deletions

View File

@@ -6,7 +6,6 @@ package chess;
import chess.controller.CommandExecutor;
import chess.controller.commands.NewGameCommand;
import chess.model.Game;
import chess.simulator.PromoteTest;
import chess.view.consolerender.Console;
public class ConsoleMain {
@@ -14,16 +13,9 @@ public class ConsoleMain {
Game game = new Game();
CommandExecutor commandExecutor = new CommandExecutor(game);
PromoteTest promoteTest = new PromoteTest(commandExecutor);
commandExecutor.addListener(promoteTest);
Console console = new Console(commandExecutor);
commandExecutor.addListener(console);
promoteTest.onComplete.connect(() -> {
console.setCaptureInput(true);
});
commandExecutor.executeCommand(new NewGameCommand());
}
}