summaryrefslogtreecommitdiff
path: root/src/sliceitoff/game/level.py
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-03-23 21:02:56 +0200
committerViljami Ilola <+@hix.fi>2024-03-23 21:02:56 +0200
commit947df85053af2704ce1a17daf1fab13e273f0cc5 (patch)
treeece2e9e807e74988b36ec5fac0de7dcc9b4efca2 /src/sliceitoff/game/level.py
parent87cd7293498d6b30389e056a59b2e69eb7b3a418 (diff)
remove cross dependencies. moving logic towards game/...
Diffstat (limited to 'src/sliceitoff/game/level.py')
-rw-r--r--src/sliceitoff/game/level.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sliceitoff/game/level.py b/src/sliceitoff/game/level.py
index a417d8f..7c58b86 100644
--- a/src/sliceitoff/game/level.py
+++ b/src/sliceitoff/game/level.py
@@ -15,7 +15,7 @@ class Level:
self.field = Field()
self.enemies = Enemies(field = self.field)
self.player = Player(field = self.field, enemies = self.enemies)
- self.gameplay = Gameplay(player = self.player, status = self.status)
+ self.gameplay = Gameplay(player = self.player, status = self.status, field = self.field, enemies = self.enemies)
self.obj_classes = (
self.status,
self.field,
@@ -26,8 +26,10 @@ class Level:
for obj in self.obj_classes:
obj.update(dt = dt)
- Stats.update_bonus(dt)
+ self.enemies.hit_walls(self.field.active_sprites())
+ Stats.update_bonus(dt)
+
self.display.update( (
self.status.sprites,
self.field,