Correction bug > Les listener sur les pièces du tour précédent était actifs
This commit is contained in:
parent
e0df728757
commit
c7fbebd64b
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -57,11 +57,9 @@ public class MasterMindActivity extends AppCompatActivity {
|
|||||||
//on affiche la correction
|
//on affiche la correction
|
||||||
boolean gagne = this.afficherCorrection((LinearLayout) this.jeu.getChildAt(this.tour));
|
boolean gagne = this.afficherCorrection((LinearLayout) this.jeu.getChildAt(this.tour));
|
||||||
//on supprime les listener
|
//on supprime les listener
|
||||||
if(this.tour>0){
|
LinearLayout anciennesPieces =(LinearLayout) this.jeu.getChildAt(this.tour);
|
||||||
LinearLayout anciennesPieces =(LinearLayout) this.jeu.getChildAt(this.tour-1);
|
|
||||||
|
|
||||||
for(int i=0; i<anciennesPieces.getChildCount(); i++){anciennesPieces.getChildAt(i).setOnTouchListener(null);}
|
for(int i=0; i<anciennesPieces.getChildCount(); i++){anciennesPieces.getChildAt(i).setOnTouchListener(null);}
|
||||||
}
|
|
||||||
|
|
||||||
if (gagne){
|
if (gagne){
|
||||||
this.finDePartie(true);
|
this.finDePartie(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user