package application.simulator.actions; import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import application.simulator.UISimulatorWindow; import gameEngine.views.Window; import simulator.Simulator; import simulator.interfaces.gameEngine.GameEnginePresenter; import simulator.interfaces.timers.TimerService; public class ShowGameSimulatorAction extends AbstractAction { private Simulator simulator; public ShowGameSimulatorAction(Simulator simulator) { super("Show Game Simulator"); this.simulator = simulator; } @Override public void actionPerformed(ActionEvent e) { Thread game = new Thread() { @Override public void run() { Window window = Window.get(); GameEnginePresenter presenter = new GameEnginePresenter(window.getScene(), simulator); TimerService timerService = new TimerService(simulator); window.run(); } }; game.start(); } }