correction algo notation (encore)
This commit is contained in:
parent
e44c528a73
commit
e87e252360
@ -154,12 +154,13 @@ public class GameActivity extends Activity implements SaisieActivity {
|
|||||||
textView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
textView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||||
textView.setGravity(Gravity.CENTER);
|
textView.setGravity(Gravity.CENTER);
|
||||||
if (gagne){
|
if (gagne){
|
||||||
textView.setText("Victoire de l'attaquand en test coups");
|
textView.setText("Victoire de l'attaquant en "+this.grille.getSizeSubs()+" coups");
|
||||||
} else {
|
} else {
|
||||||
textView.setText("Victoire du défenseur");
|
textView.setText("Victoire du défenseur");
|
||||||
}
|
}
|
||||||
this.rootView.addView(textView);
|
this.rootView.addView(textView);
|
||||||
System.out.println(textView.getText());
|
System.out.println(textView.getText());
|
||||||
|
this.rootView.invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
//initialise les collections de pions et remplie saisie et grille de pions vides
|
//initialise les collections de pions et remplie saisie et grille de pions vides
|
||||||
|
@ -43,8 +43,10 @@ public class Bot {
|
|||||||
for(int i=0; i<4;i++) {
|
for(int i=0; i<4;i++) {
|
||||||
if (copyCombi[i]==soumission[i]) {
|
if (copyCombi[i]==soumission[i]) {
|
||||||
note.add(this.pionsNotation[1]);
|
note.add(this.pionsNotation[1]);
|
||||||
|
System.out.println(copyCombi[i]+" good "+i);
|
||||||
copyCombi[i]=null;
|
copyCombi[i]=null;
|
||||||
System.out.println(note.getLast()+" good "+i);
|
soumission[i]=null;
|
||||||
|
System.out.println(copyCombi[i]+" good "+i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,8 +56,9 @@ public class Bot {
|
|||||||
for (int y=0;y<4;y++){
|
for (int y=0;y<4;y++){
|
||||||
if (soumission[y]==copyCombi[i]) {
|
if (soumission[y]==copyCombi[i]) {
|
||||||
note.add(this.pionsNotation[0]);
|
note.add(this.pionsNotation[0]);
|
||||||
System.out.println(note.getLast() + " almost "+i);
|
System.out.println(copyCombi[i] + " almost "+i+" "+y);
|
||||||
copyCombi[i] = null;
|
copyCombi[i] = null;
|
||||||
|
System.out.println(copyCombi[i] + " almost "+i+" "+y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user