diff --git a/app/src/main/java/com/example/mastermind/ChoiceCombi.java b/app/src/main/java/com/example/mastermind/ChoiceCombi.java index a0d60b9..fe4d2d1 100644 --- a/app/src/main/java/com/example/mastermind/ChoiceCombi.java +++ b/app/src/main/java/com/example/mastermind/ChoiceCombi.java @@ -14,12 +14,18 @@ public class ChoiceCombi extends Activity implements SaisieActivity { private Saisie saisie; private Integer[] combiGagnante; private Integer[] pions; + private boolean emptyPion; private View view; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); int[] tab = getIntent().getIntArrayExtra("pions"); - this.pions=new Integer[6]; + this.emptyPion = getIntent().getBooleanExtra("emptyPion", false); + if(emptyPion) { + this.pions=new Integer[7]; + } else { + this.pions=new Integer[6]; + } for (int i=0;i couleurs = new LinkedList(); couleurs.addAll(this.saisie.getChoix()); - for (int i=0;i