SAE21_2021/SaveListener.java

18 lines
538 B
Java
Raw Normal View History

2022-05-24 22:57:12 +02:00
import java.awt.event.*;
public class SaveListener implements ActionListener {
private Grille grille;
private FrameJeu fenetre;
public SaveListener(Grille grille, FrameJeu fenetre){
this.grille=grille;
this.fenetre=fenetre;
}
@Override
public void actionPerformed(ActionEvent event){
SaveManager saveManager = new SaveManager();
saveManager.save(this.grille, "Save.txt");
SaveManager.SaveData donnees = saveManager.load("Save.txt");
this.fenetre.dispose();
}
}