@Override
    public void actionPerformed(ActionEvent ae) {
        
        if (ae.getSource() == resumeGameButton){
            gui.setVisible(true);
            this.dispose();
        }
        else if (ae.getSource() == saveGameButton){
            
            Save s = new Save();
            
            s.saveWorldCheck(gui.gameWorld);
            
            s = null;
            
        }
        else if (ae.getSource() == exitButton){
            int answer = JOptionPane.showConfirmDialog(this, "Do you want to save first");
            if (answer == 0){
                Save s = new Save();
            
            s.saveWorld(gui.gameWorld);
            exit(0);
            }
            else if (answer == 1){
            exit(0);
            }
            else if (answer == 2){
                
            }
        }
        
        
    }