Skip to content
Snippets Groups Projects
Select Git revision
  • master
1 result

Settings.java

Blame
  • Game.java 1.89 KiB
    /*
     * To change this license header, choose License Headers in Project Properties.
     * To change this template file, choose Tools | Templates
     * and open the template in the editor.
     */
    
    package Program;
    
    import hu.bme.szoftlab3.mindesweeper.GUI.menu.Menu;
    
    /**
     *
     * @author Kovax
     */
    public class Game
    {
        public Menu                                                 menu;
        public hu.bme.szoftlab3.mindesweeper.GUI.game.Game          game;
        public Settings                                             settings;
        public hu.bme.szoftlab3.mindesweeper.GUI.settings.Settings  settingsWindow;
        
        private int window;
        /**
         * 
         * 
         * @param settings 
         */
        public Game(Settings settings)
        {
            this.window = 0;
            this.settings = settings;
            this.settings.game = this;
            this.settings.load();
            this.windowManager(0);
        }
        /**
         * Modulkezelo, a megfelelo modult tolti be
         * 
         * @param window 
         */
        public void windowManager(int window)
        {
            switch(window)
            {
                case 0: this.menuWindow();
                        break;
                case 1: this.gameWindow();
                        break;
                case 2: this.settingsWindow();
                        break;
            }
        }
       /**
        * A jatek modult inditja el (peldanyositja)
        * 
        */
        public void gameWindow()
        {
            this.game = new hu.bme.szoftlab3.mindesweeper.GUI.game.Game(this.settings,this);
        }
        /**
         * A menu modult inditja el
         * 
         */
        public void menuWindow()   
        {
            Menu menu = new Menu(this);
            this.menu =  menu;
        }
        /**