refactor OutputSystem
This commit is contained in:
21
app/src/main/java/chess/SwingMain.java
Normal file
21
app/src/main/java/chess/SwingMain.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package chess;
|
||||
|
||||
import chess.controller.CommandExecutor;
|
||||
import chess.controller.commands.NewGameCommand;
|
||||
import chess.model.ChessBoard;
|
||||
import chess.model.Game;
|
||||
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.setGame(game);
|
||||
commandExecutor.addListener(window);
|
||||
|
||||
commandExecutor.executeCommand(new NewGameCommand());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user