From a6581cd37e2777ff2aed87870492fea9646174af Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Fri, 28 Feb 2020 17:14:30 +0100 Subject: [PATCH] Increase difficulty per wave --- src/main/java/fr/ynerant/leveleditor/game/GameFrame.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/fr/ynerant/leveleditor/game/GameFrame.java b/src/main/java/fr/ynerant/leveleditor/game/GameFrame.java index d35dc2f..c4efaea 100644 --- a/src/main/java/fr/ynerant/leveleditor/game/GameFrame.java +++ b/src/main/java/fr/ynerant/leveleditor/game/GameFrame.java @@ -116,7 +116,8 @@ public class GameFrame extends JFrame { public void tick() { if (mobs.isEmpty() && round < 4) { ++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(); do mob.move(RANDOM.nextInt(getMap().getWidth() / 16), RANDOM.nextInt(getMap().getHeight() / 16));