nettoyage
This commit is contained in:
Binary file not shown.
+7
-5
@@ -20,14 +20,15 @@ public class Banniere extends JPanel {
|
|||||||
// Méthode pour afficher le nombre de mines restantes
|
// Méthode pour afficher le nombre de mines restantes
|
||||||
public void setMinesLeft(int minesLeft) {
|
public void setMinesLeft(int minesLeft) {
|
||||||
this.removeAll();
|
this.removeAll();
|
||||||
this.add(new JLabel("Mines restantes : "+Integer.toString(minesLeft)));
|
this.add(new JLabel("Mines restantes : "+Integer.toString(minesLeft)),BorderLayout.CENTER);
|
||||||
this.repaint();
|
this.repaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Méthode pour indiquer au joueur sa Victoire
|
// Méthode pour indiquer au joueur sa Victoire
|
||||||
public void setVictoire() {
|
public void setVictoire() {
|
||||||
this.add(new Fin("Victoire ! Retour au menu...",this.getSize()));
|
JLabel victoire = new JLabel("Victoire ! Retour au menu...");
|
||||||
this.repaint();
|
victoire.setForeground(new Color(0, 22, 236));
|
||||||
|
this.add(victoire,BorderLayout.SOUTH);
|
||||||
Timer timerMenu = new Timer(5000, new MenuListener(this.fenetre, this.menu));
|
Timer timerMenu = new Timer(5000, new MenuListener(this.fenetre, this.menu));
|
||||||
timerMenu.setRepeats(false);
|
timerMenu.setRepeats(false);
|
||||||
timerMenu.start();
|
timerMenu.start();
|
||||||
@@ -35,8 +36,9 @@ public class Banniere extends JPanel {
|
|||||||
|
|
||||||
// Méthode pour indiquer au joueur sa Défaite
|
// Méthode pour indiquer au joueur sa Défaite
|
||||||
public void setDefaite() {
|
public void setDefaite() {
|
||||||
this.add(new Fin("Défaite ! Retour au menu...",this.getSize()));
|
JLabel defaite = new JLabel("Défaite ! Retour au menu...");
|
||||||
this.repaint();
|
defaite.setForeground(new Color(0, 22, 236));
|
||||||
|
this.add(defaite,BorderLayout.SOUTH);
|
||||||
Timer timerMenu = new Timer(5000, new MenuListener(this.fenetre, this.menu));
|
Timer timerMenu = new Timer(5000, new MenuListener(this.fenetre, this.menu));
|
||||||
timerMenu.setRepeats(false);
|
timerMenu.setRepeats(false);
|
||||||
timerMenu.start();
|
timerMenu.start();
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user