fix console promote
This commit is contained in:
@@ -7,7 +7,7 @@ import chess.controller.CommandExecutor;
|
||||
import chess.controller.commands.NewGameCommand;
|
||||
import chess.model.ChessBoard;
|
||||
import chess.model.Game;
|
||||
import chess.simulator.CastlingTest;
|
||||
import chess.simulator.PromoteTest;
|
||||
import chess.view.consolerender.Console;
|
||||
|
||||
public class ConsoleMain {
|
||||
@@ -15,8 +15,15 @@ public class ConsoleMain {
|
||||
Game game = new Game(new ChessBoard());
|
||||
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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user