tp6
This commit is contained in:
@@ -24,7 +24,7 @@ public class JGrilleDeJeu extends JComponent {
|
||||
this.controleur = new ControleurClavier();
|
||||
this.fenetre.addKeyListener(controleur);
|
||||
this.directionActuelle = "Right";
|
||||
this.intervalleTimer = 500;
|
||||
this.intervalleTimer = 150;
|
||||
|
||||
Random r = new Random();
|
||||
int coordXPomme = Math.abs(r.nextInt() % TAILLE_GRILLE);
|
||||
@@ -145,13 +145,6 @@ public class JGrilleDeJeu extends JComponent {
|
||||
}
|
||||
this.coordSnake.addFirst(aAjouter);
|
||||
this.coordSnake.addFirst(coordQueue);
|
||||
|
||||
if (this.intervalleTimer != 200) {
|
||||
this.intervalleTimer -= 50;
|
||||
this.timer.cancel();
|
||||
this.timer = new Timer();
|
||||
this.timer.scheduleAtFixedRate(new TacheTimer(this), 0, this.intervalleTimer);
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user