diff --git a/CASE/IMAGE/lose.png b/CASE/IMAGE/lose.png new file mode 100644 index 0000000..29e6bdc Binary files /dev/null and b/CASE/IMAGE/lose.png differ diff --git a/CASE/IMAGE/win.png b/CASE/IMAGE/win.png new file mode 100644 index 0000000..a204f95 Binary files /dev/null and b/CASE/IMAGE/win.png differ diff --git a/CASE/main_ex.class b/CASE/main_ex.class index 6818521..e6f8826 100644 Binary files a/CASE/main_ex.class and b/CASE/main_ex.class differ diff --git a/CASE/main_ex.java b/CASE/main_ex.java index 86351ed..73807f2 100644 --- a/CASE/main_ex.java +++ b/CASE/main_ex.java @@ -12,7 +12,7 @@ public class main_ex{ JFrame fenetre = new JFrame("Démineur"); int ligne=10; int collonne=20; - int bombe=30; + int bombe=1; fenetre.setLocation(0,0); //on choisi une taille arbitraire diff --git a/CASE/observateurCase.class b/CASE/observateurCase.class index b4f2ae0..3816896 100644 Binary files a/CASE/observateurCase.class and b/CASE/observateurCase.class differ diff --git a/CASE/observateurCase.java b/CASE/observateurCase.java index e837e9e..df1daa4 100644 --- a/CASE/observateurCase.java +++ b/CASE/observateurCase.java @@ -18,6 +18,27 @@ public class observateurCase implements MouseListener{ } @Override public void mouseClicked(MouseEvent evenement){ + //nous testons si le joueur a gagner/perdu + //si perdu + if(plateau.etatDeVictoire(this.tableau)==-1){ + plateau.removeListener(this.tableau); + for(int i=0;i=0){ diff --git a/CASE/plateau.class b/CASE/plateau.class index 91e72cc..6c4ede1 100644 Binary files a/CASE/plateau.class and b/CASE/plateau.class differ diff --git a/CASE/plateau.java b/CASE/plateau.java index f6f1840..bd9427d 100644 --- a/CASE/plateau.java +++ b/CASE/plateau.java @@ -116,7 +116,7 @@ public class plateau{ } //-----------------------------------Fonction après victoire/defaite pour enlever les observateur a chaque Case-------------------------------- - public static void perduGagner(Case[][] tableau0){ + public static void removeListener(Case[][] tableau0){ //on parcour le tableau du jeu for(int i=0; i