@Override
    public void actionPerformed(ActionEvent ae) {
        if (ae.getSource() == start) {
            menu.dispose();
            Game peli = new Game(setting.getDifficulty());
            peli.run();
            peli.gameStart();            
        }else if (ae.getSource() == contin) {
            Game peli = new Game(setting.getDifficulty());            
            try {
                InputStream stream = this.getClass().getClassLoader().getResourceAsStream("ohha/save.txt");                                
                Scanner lukija = new Scanner(stream);
                peli.setDifficulty(Integer.parseInt(lukija.nextLine()));
                peli.setLevel(Integer.parseInt(lukija.nextLine()));
                peli.run();
                peli.getPlayer().setStrength(Integer.parseInt(lukija.nextLine()));
                peli.getPlayer().setAttackSpeed(Integer.parseInt(lukija.nextLine()));
                peli.getPlayer().setDefence(Integer.parseInt(lukija.nextLine()));
                peli.getPlayer().setMaxHealth(Integer.parseInt(lukija.nextLine()));
                peli.getPlayer().gainExperiencePoints(Integer.parseInt(lukija.nextLine()));
                peli.getPlayer().gainSkillPoints(Integer.parseInt(lukija.nextLine()));
                while(lukija.hasNextLine()) {
                    peli.getPlayer().addSkill(peli.getSkillMap().get(lukija.nextLine()));
                }                
            }catch (Exception e) {
                e.printStackTrace();
            }
            menu.dispose();
            peli.gameStart();
        }else if (ae.getSource() == settings) {
            if (!menuCreated) {
                setting.run();
                menuCreated = true;
            }else {
                setting.asetaNakyvaksi();
                setting.getFrame().setLocationRelativeTo(null);
            }
        }else if (ae.getSource() == quit) {
            System.exit(0);
        }
    }