]> Skullheadx's Git Forge - fruit-ninja.git/commitdiff
wave bomb fix
authorSkullheadx <94652084+Skullheadx@users.noreply.github.com>
Fri, 2 Jun 2023 02:47:36 +0000 (22:47 -0400)
committerSkullheadx <94652084+Skullheadx@users.noreply.github.com>
Fri, 2 Jun 2023 02:47:36 +0000 (22:47 -0400)
game.py

diff --git a/game.py b/game.py
index cd5675f8dc5fb06c190b72a1feb563e72852fc61..ce812d3c3c748e62798eac4cf68437ff6e130d8d 100644 (file)
--- a/game.py
+++ b/game.py
@@ -38,7 +38,7 @@ class Game:
             if (not -bomb.RADIUS <= br.x < WIDTH) or br.y > HEIGHT:
                 self.bombs.remove(bomb)
 
-        if len(self.fruits) == 0:
+        if len(self.fruits) == 0 and len(self.bombs) == 0:
             self.wave += 1
             for i in range(self.wave):
                 if random.random() < self.BOMB_CHANCE: