Increase difficulty per wave

This commit is contained in:
Yohann D'ANELLO 2020-02-28 17:14:30 +01:00
parent 5517a10f56
commit a6581cd37e
1 changed files with 2 additions and 1 deletions

View File

@ -116,7 +116,8 @@ public class GameFrame extends JFrame {
public void tick() { public void tick() {
if (mobs.isEmpty() && round < 4) { if (mobs.isEmpty() && round < 4) {
++round; ++round;
for (int i = 1; i <= RANDOM.nextInt(16) + 1; ++i) { int nb_mobs = round * (RANDOM.nextInt(16) + 1);
for (int i = 1; i <= nb_mobs; ++i) {
Mob mob = Mob.getRandomMob(); Mob mob = Mob.getRandomMob();
do do
mob.move(RANDOM.nextInt(getMap().getWidth() / 16), RANDOM.nextInt(getMap().getHeight() / 16)); mob.move(RANDOM.nextInt(getMap().getWidth() / 16), RANDOM.nextInt(getMap().getHeight() / 16));