package fr.monkhanny.dorfromantik.listeners;

import fr.monkhanny.dorfromantik.Main;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JFrame;

public class GameMainMenuButtonListener implements ActionListener {
    private JFrame gameFrame;

    public GameMainMenuButtonListener(JFrame gameFrame) {
        this.gameFrame = gameFrame;
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        this.gameFrame.setVisible(false);
        Main.resetGame();
    }
}