simplify mains
This commit is contained in:
@@ -8,12 +8,10 @@ import chess.view.simplerender.Window;
|
||||
|
||||
public class SwingMain {
|
||||
public static void main(String[] args) {
|
||||
CommandExecutor commandExecutor = new CommandExecutor();
|
||||
|
||||
Game game = new Game(new ChessBoard());
|
||||
Window window = new Window(commandExecutor);
|
||||
CommandExecutor commandExecutor = new CommandExecutor(game);
|
||||
|
||||
commandExecutor.setGame(game);
|
||||
Window window = new Window(commandExecutor);
|
||||
commandExecutor.addListener(window);
|
||||
|
||||
commandExecutor.executeCommand(new NewGameCommand());
|
||||
|
||||
Reference in New Issue
Block a user