correction algo notation (encore)

This commit is contained in:
Haïssous Kayyissa 2023-04-09 17:20:06 +02:00
parent e44c528a73
commit e87e252360
2 changed files with 7 additions and 3 deletions

View File

@ -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.setGravity(Gravity.CENTER);
if (gagne){
textView.setText("Victoire de l'attaquand en test coups");
textView.setText("Victoire de l'attaquant en "+this.grille.getSizeSubs()+" coups");
} else {
textView.setText("Victoire du défenseur");
}
this.rootView.addView(textView);
System.out.println(textView.getText());
this.rootView.invalidate();
}
//initialise les collections de pions et remplie saisie et grille de pions vides

View File

@ -43,8 +43,10 @@ public class Bot {
for(int i=0; i<4;i++) {
if (copyCombi[i]==soumission[i]) {
note.add(this.pionsNotation[1]);
System.out.println(copyCombi[i]+" good "+i);
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++){
if (soumission[y]==copyCombi[i]) {
note.add(this.pionsNotation[0]);
System.out.println(note.getLast() + " almost "+i);
System.out.println(copyCombi[i] + " almost "+i+" "+y);
copyCombi[i] = null;
System.out.println(copyCombi[i] + " almost "+i+" "+y);
}
}
}