Files
3DChess/app/src/main/java/chess/ConsoleMain.java
2025-04-12 11:12:36 +02:00

25 lines
676 B
Java

/*
* 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.view.consolerender.Console;
public class ConsoleMain {
public static void main(String[] args) {
CommandExecutor commandExecutor = new CommandExecutor();
Game game = new Game(new ChessBoard());
Console console = new Console(commandExecutor);
commandExecutor.setGame(game);
commandExecutor.addListener(console);
commandExecutor.executeCommand(new NewGameCommand());
}
}