summaryrefslogtreecommitdiff
path: root/src/sliceitoff/game/level.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/sliceitoff/game/level.py')
-rw-r--r--src/sliceitoff/game/level.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/sliceitoff/game/level.py b/src/sliceitoff/game/level.py
index 7c58b86..25c34b9 100644
--- a/src/sliceitoff/game/level.py
+++ b/src/sliceitoff/game/level.py
@@ -1,3 +1,5 @@
+import pygame
+
from display import Display
from status import Status
from player import Player
@@ -13,9 +15,13 @@ class Level:
self.display = display
self.status = Status()
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, field = self.field, enemies = self.enemies)
+ self.enemies = Enemies()
+ self.player = Player()
+ self.gameplay = Gameplay(
+ player = self.player,
+ status = self.status,
+ field = self.field,
+ enemies = self.enemies)
self.obj_classes = (
self.status,
self.field,
@@ -31,10 +37,13 @@ class Level:
Stats.update_bonus(dt)
self.display.update( (
- self.status.sprites,
+ self.status,
self.field,
self.enemies,
- self.player.sprites) )
+ pygame.sprite.GroupSingle(
+ sprite = self.player.get_top_sprite())))
+
+
if self.gameplay.step():
return False