modif génération bonus malus pour qu'il soit plus fréquents

This commit is contained in:
2026-03-17 14:36:42 +01:00
parent 7e61100fd5
commit 46a8b04ab3
4 changed files with 13 additions and 4 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 = 50 + random.nextInt(101);
this.prochainMalusScore = 100 + random.nextInt(101);
this.prochainBonusScore = 100 + random.nextInt(26);
this.prochainMalusScore = 100 + random.nextInt(26);
}
@Override
@@ -187,7 +187,7 @@ public class Jeu implements KeyListener, ActionListener {
Bonus bonus = new Bonus(xSpawn, yBonus, laligne.vitesseDefilement);
ecran.ajouterObjet(bonus);
this.prochainBonusScore = score + 50 + random.nextInt(101);
this.prochainBonusScore = score + 40 + random.nextInt(21);
}
}
@@ -202,7 +202,7 @@ public class Jeu implements KeyListener, ActionListener {
Malus malus = new Malus(xSpawn, yMalus, laligne.vitesseDefilement);
ecran.ajouterObjet(malus);
this.prochainMalusScore = score + 100 + random.nextInt(101);
this.prochainMalusScore = score + 40 + random.nextInt(21);
}
}