modif nb segments + y spwan + frequence spawn

This commit is contained in:
2026-03-17 14:59:32 +01:00
parent 46a8b04ab3
commit 8444aa7aa7
3 changed files with 11 additions and 11 deletions

View File

@@ -166,8 +166,8 @@ public class Jeu implements KeyListener, ActionListener {
score = 0;
labScore.setText("<html><h3>score : 0</h3></html>");
this.prochainBonusScore = 100 + random.nextInt(26);
this.prochainMalusScore = 100 + random.nextInt(26);
this.prochainBonusScore = 100 + random.nextInt(36);
this.prochainMalusScore = 100 + random.nextInt(46);
}
@Override
@@ -181,13 +181,13 @@ public class Jeu implements KeyListener, ActionListener {
double yLigne = laligne.getHauteurLigneA(xSpawn);
if (yLigne != -1) {
double yOffset = random.nextBoolean() ? -30 : 30;
double yOffset = random.nextBoolean() ? -40 : 40;
double yBonus = yLigne + yOffset;
Bonus bonus = new Bonus(xSpawn, yBonus, laligne.vitesseDefilement);
ecran.ajouterObjet(bonus);
this.prochainBonusScore = score + 40 + random.nextInt(21);
this.prochainBonusScore = score + 40 + random.nextInt(31);
}
}
@@ -196,13 +196,13 @@ public class Jeu implements KeyListener, ActionListener {
double yLigne = laligne.getHauteurLigneA(xSpawn);
if (yLigne != -1) {
double yOffset = random.nextBoolean() ? -30 : 30;
double yOffset = random.nextBoolean() ? -40 : 40;
double yMalus = yLigne + yOffset;
Malus malus = new Malus(xSpawn, yMalus, laligne.vitesseDefilement);
ecran.ajouterObjet(malus);
this.prochainMalusScore = score + 40 + random.nextInt(21);
this.prochainMalusScore = score + 60 + random.nextInt(41);
}
}