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

@@ -20,12 +20,17 @@ public class Console implements GameListener {
private final Scanner scanner = new Scanner(System.in);
private final CommandExecutor commandExecutor;
private final ConsolePieceName consolePieceName = new ConsolePieceName();
private boolean captureInput = false;
private boolean captureInput;
private final ExecutorService executor;
public Console(CommandExecutor commandExecutor) {
public Console(CommandExecutor commandExecutor, boolean captureInput) {
this.commandExecutor = commandExecutor;
this.executor = Executors.newSingleThreadExecutor();
this.captureInput = captureInput;
}
public Console(CommandExecutor commandExecutor) {
this(commandExecutor, true);
}
private Piece pieceAt(int x, int y) {