diff --git a/CASE/Case.class b/CASE/Case.class index 28842cf..91cfb37 100644 Binary files a/CASE/Case.class and b/CASE/Case.class differ diff --git a/CASE/main_ex.class b/CASE/main_ex.class index 9bd9f64..dea40f6 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 f61dfdc..49f1cbe 100644 --- a/CASE/main_ex.java +++ b/CASE/main_ex.java @@ -14,10 +14,12 @@ public class main_ex{ int collonne=20; int bombe=12; fenetre.setLocation(0,0); + fenetre.setSize(1500,500); + fenetre.setVisible(true); //on choisi une taille arbitraire //nous utiliserons un gestionnaire GridLayout de dimensions choisi précédament - plateau plat = new plateau(fenetre,ligne,collonne, bombe); - + plateau jeu = new plateau(fenetre); + jeu.newGame(10,20,12); } } \ No newline at end of file diff --git a/CASE/observateurSAV.class b/CASE/observateurSAV.class index ee91ac8..ec19f30 100644 Binary files a/CASE/observateurSAV.class and b/CASE/observateurSAV.class differ diff --git a/CASE/observateurSAV.java b/CASE/observateurSAV.java index 9089f84..bcfcfd8 100644 --- a/CASE/observateurSAV.java +++ b/CASE/observateurSAV.java @@ -20,7 +20,7 @@ public class observateurSAV implements MouseListener{ plat.getFenetre().dispose(); } if(this.fonction==true){ - plateau nouvellePartie= new plateau(plat.getFenetre(), plat.getLigne(), plat.getCollonne(), plat.getBombe()); + plat.newGame(plat.getLigne(), plat.getCollonne(), plat.getBombe()); } } @Override // un bouton cliqué diff --git a/CASE/paintMenuJeu.class b/CASE/paintMenuJeu.class index 1bd21b8..5d64668 100644 Binary files a/CASE/paintMenuJeu.class and b/CASE/paintMenuJeu.class differ diff --git a/CASE/paintMenuJeu.java b/CASE/paintMenuJeu.java index ab90593..a05fd54 100644 --- a/CASE/paintMenuJeu.java +++ b/CASE/paintMenuJeu.java @@ -93,9 +93,9 @@ public class paintMenuJeu extends JComponent{ if(this.choix==7){ if(this.survol==true){ secondPinceau.setColor(new Color(0,255,0)); - secondPinceau.fillRect(0, 0, this.getWidth(), this.getHeight()); + secondPinceau.fillRect(0, 0, this.getWidth()/16*5, this.getHeight()/16*5); } - secondPinceau.drawImage(this.replay, this.getWidth()/6, this.getHeight()/6, this.getWidth()/6*4, this.getHeight()/6*4 ,this); + secondPinceau.drawImage(this.replay, 0, 0, this.getWidth()/16*4, this.getHeight()/16*4 ,this); } } private void paintNombre(Graphics secondPinceau, int nombre){ diff --git a/CASE/plateau.class b/CASE/plateau.class index 13c84d3..c2439d6 100644 Binary files a/CASE/plateau.class and b/CASE/plateau.class differ diff --git a/CASE/plateau.java b/CASE/plateau.java index cbea287..f93285c 100644 --- a/CASE/plateau.java +++ b/CASE/plateau.java @@ -15,59 +15,8 @@ public class plateau{ private int ligne, collonne, bombe; private paintMenuJeu[] tabScore= new paintMenuJeu[3]; private Case[][] tableau; - public plateau(JFrame fenetre0, int ligne0, int collonne0, int bombe0){ + public plateau(JFrame fenetre0){ this.fenetre=fenetre0; - this.ligne=ligne0; - this.collonne=collonne0; - this.bombe=bombe0; - this.tableau=new Case[ligne][collonne]; - this.fenetre.dispose(); - this.fenetre=new JFrame("démineur"); - GridLayout grille = new GridLayout(ligne+1,collonne); - for(int i=0; i