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
|
//affichage des anciennes soumissions
|
||||||
LinkedList<Integer> grille = new LinkedList<Integer>();
|
LinkedList<Integer> grille = new LinkedList<Integer>();
|
||||||
grille.addAll(this.grille.getSoumissions());
|
grille.addAll(this.grille.getSoumissions());
|
||||||
|
System.out.println(grille.size());
|
||||||
for (int y=0; y<10;y++) {
|
for (int y=0; y<10;y++) {
|
||||||
for (int x=0;x<4;x++) {
|
for (int x=0;x<4;x++) {
|
||||||
this.circle.setColor(grille.pop());
|
this.circle.setColor(grille.pop());
|
||||||
|
@ -21,12 +21,14 @@ public class Grille {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addSoumission(LinkedList<Integer> newSub){
|
public void addSoumission(LinkedList<Integer> newSub){
|
||||||
|
if (this.sizeSubs<10) {
|
||||||
for (int i = 4; i > 0; i--) {
|
for (int i = 4; i > 0; i--) {
|
||||||
System.out.println("i="+i+", new sub="+newSub);
|
this.soumissions.remove(0);
|
||||||
this.soumissions.set(this.soumissions.size()-this.sizeSubs*4-i,newSub.pop());
|
this.soumissions.addLast(newSub.poll());
|
||||||
}
|
}
|
||||||
this.sizeSubs += 1;
|
this.sizeSubs += 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void initGrille(Collection<Integer> SubToCopy){
|
public void initGrille(Collection<Integer> SubToCopy){
|
||||||
for(int i=0;i<10;i++){
|
for(int i=0;i<10;i++){
|
||||||
|
Loading…
Reference in New Issue
Block a user