/* * This Java source file was generated by the Gradle 'init' task. */ package chess; import chess.controller.CommandExecutor; import chess.controller.commands.NewGameCommand; import chess.model.ChessBoard; import chess.model.Game; import chess.simulator.PromoteTest; import chess.view.consolerender.Console; public class ConsoleMain { public static void main(String[] args) { 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()); } }