summaryrefslogtreecommitdiff
path: root/src/sliceitoff/game/gameplay.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/gameplay.py
parent87cd7293498d6b30389e056a59b2e69eb7b3a418 (diff)
remove cross dependencies. moving logic towards game/...
Diffstat (limited to 'src/sliceitoff/game/gameplay.py')
-rw-r--r--src/sliceitoff/game/gameplay.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sliceitoff/game/gameplay.py b/src/sliceitoff/game/gameplay.py
index 6296a5a..e691b84 100644
--- a/src/sliceitoff/game/gameplay.py
+++ b/src/sliceitoff/game/gameplay.py
@@ -14,13 +14,14 @@ class Gameplay:
self.status = status
self.player = player
self.field = field
- self.field = enemies
+ self.enemies = enemies
def fire(self):
if self.player.fire_lazer():
- field.kill_if_not_colliding(enemies.sprites())
if Stats.lose_life():
return True
+ self.field.kill_if_not_colliding(self.enemies.sprites())
+ self.field.update_stats()
return Stats.percent < 20
def quit(self):