diff --git a/boum.scala b/boum.scala index 72d7c4e5bebfdab9cf599daf4e4d850a1b70ff46..f59fca4231817d6a179f0e78b95079d83274910e 100644 --- a/boum.scala +++ b/boum.scala @@ -143,28 +143,28 @@ class Demineur { // Propagation du dÃ©voilement des cases vides def propage(x: Int, y: Int){ if (x > 0) { - if(boutons(x-1)(y).enabled){clique_action(x-1,y)} + if(boutons(x-1)(y).enabled && champ(x-1)(y) != 9){clique_action(x-1,y)} if(y > 0){ - if(boutons(x-1)(y-1).enabled){clique_action(x-1,y-1)} + if(boutons(x-1)(y-1).enabled && champ(x-1)(y-1) != 9){clique_action(x-1,y-1)} } if(y < tailleY-1){ - if(boutons(x-1)(y+1).enabled){clique_action(x-1,y+1)} + if(boutons(x-1)(y+1).enabled && champ(x-1)(y+1) != 9){clique_action(x-1,y+1)} } } if (x < tailleX-1) { - if(boutons(x+1)(y).enabled){clique_action(x+1,y)} + if(boutons(x+1)(y).enabled && champ(x+1)(y) != 9){clique_action(x+1,y)} if(y > 0){ - if(boutons(x+1)(y-1).enabled){clique_action(x+1,y-1)} + if(boutons(x+1)(y-1).enabled && champ(x+1)(y-1) != 9){clique_action(x+1,y-1)} } if(y < tailleY-1){ - if(boutons(x+1)(y+1).enabled){clique_action(x+1,y+1)} + if(boutons(x+1)(y+1).enabled && champ(x+1)(y+1) != 9){clique_action(x+1,y+1)} } } if(y>0){ - if(boutons(x)(y-1).enabled){clique_action(x,y-1)} + if(boutons(x)(y-1).enabled && champ(x)(y-1) != 9){clique_action(x,y-1)} } if(y