fix de l'ordre des soumissions
This commit is contained in:
parent
c313f2846e
commit
a1622fa86c
@ -39,6 +39,7 @@ public class GameView extends View {
|
||||
//affichage des anciennes soumissions
|
||||
LinkedList<Integer> grille = new LinkedList<Integer>();
|
||||
grille.addAll(this.grille.getSoumissions());
|
||||
System.out.println(grille.size());
|
||||
for (int y=0; y<10;y++) {
|
||||
for (int x=0;x<4;x++) {
|
||||
this.circle.setColor(grille.pop());
|
||||
|
@ -21,11 +21,13 @@ public class Grille {
|
||||
}
|
||||
|
||||
public void addSoumission(LinkedList<Integer> newSub){
|
||||
for (int i=4;i>0;i--){
|
||||
System.out.println("i="+i+", new sub="+newSub);
|
||||
this.soumissions.set(this.soumissions.size()-this.sizeSubs*4-i,newSub.pop());
|
||||
if (this.sizeSubs<10) {
|
||||
for (int i = 4; i > 0; i--) {
|
||||
this.soumissions.remove(0);
|
||||
this.soumissions.addLast(newSub.poll());
|
||||
}
|
||||
this.sizeSubs += 1;
|
||||
}
|
||||
this.sizeSubs+=1;
|
||||
}
|
||||
|
||||
public void initGrille(Collection<Integer> SubToCopy){
|
||||
|
Loading…
Reference in New Issue
Block a user