package engine;

import javax.swing.*;

public class MenuPanel {

    private boolean lancementpartie = false;
    private final JButton button;

    public boolean isLancementpartie() {
        return lancementpartie;
    }

    public MenuPanel(){
        JFrame f=new JFrame();
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.button = new JButton("Nouvelle partie");
        JPanel panel = new JPanel();
        panel.add(button);

        f.getContentPane().add(panel);
        f.pack();
        f.setVisible(true);
        f.getContentPane().setFocusable(true);
    }

    public void waitlancementpartie(){
        button.addActionListener(e -> lancementpartie = true);
    }
}
