Modification ligne sort ecran + taille voiture de base + frequence spwan bonus/malus

This commit is contained in:
2026-03-17 14:24:33 +01:00
parent 1734bf2ab4
commit fdc3892ef4
3 changed files with 4 additions and 4 deletions

View File

@@ -187,7 +187,7 @@ public class Jeu implements KeyListener, ActionListener {
Bonus bonus = new Bonus(xSpawn, yBonus, laligne.vitesseDefilement);
ecran.ajouterObjet(bonus);
this.prochainBonusScore = score + 300 + random.nextInt(201);
this.prochainBonusScore = score + 50 + random.nextInt(101);
}
}
@@ -202,7 +202,7 @@ public class Jeu implements KeyListener, ActionListener {
Malus malus = new Malus(xSpawn, yMalus, laligne.vitesseDefilement);
ecran.ajouterObjet(malus);
this.prochainMalusScore = score + 400 + random.nextInt(201);
this.prochainMalusScore = score + 70 + random.nextInt(101);
}
}

View File

@@ -67,7 +67,7 @@ public class Ligne extends ObjetGraphique{// Hérite de la classe ObjetGraphique
} else {
dy = (Math.random() * (2.0 * inclinaisonMax)) - inclinaisonMax;
if (y + dy < 0 || y + dy > 600) {
if (y + dy < 50 || y + dy > 550) {
dy = -dy;
}
}

View File

@@ -14,7 +14,7 @@ public class Voiture extends Cercle {
public Voiture() {
super();
this.rayon = 25;
this.rayon = 27;
}
@Override