/** Quits the game and closes the GUI */ public static void quit() { Main.setClosing(true); Main.lightsOutRunning = false; game = null; Main.nothingRunning(); Main.resetCards(); LightsOutDialog.dispose(); Main.setCardIcon(Main.lightsOutCard, "lightsOut", "default"); }
/** * Method called to close the GUI and game. <br> * Should not be called from within LightsOut class. * * @return 1 */ public static int quitLightsOut() { LightsOut.forceQuit(); Main.setClosing(true); game = null; Main.lightsOutRunning = false; Main.nothingRunning(); Main.resetCards(); LightsOutDialog.dispose(); return 1; }
/** Sets the window position and dimenstions */ private static void initialize() { Main.setClosing(false); Main.setCardIcon(Main.lightsOutCard, "lightsOut", "selected"); LightsOut.setDifficulty(defaultDifficulty); mainWindowX = Main.getWindowPositionX(); mainWindowY = Main.getWindowPositionY(); mainWindowW = Main.getWindowDimensionsW(); mainWindowH = Main.getWindowDimensionsH(); windowW = 600; windowH = mainWindowH; windowX = (mainWindowX + mainWindowW + 20); windowY = (mainWindowY); }