diff options
author | Viljami Ilola <+@hix.fi> | 2024-03-30 13:04:39 +0200 |
---|---|---|
committer | Viljami Ilola <+@hix.fi> | 2024-03-30 13:04:39 +0200 |
commit | acfac65f17a274d6d7f73cb44ed9476032241134 (patch) | |
tree | 0ef93c0d81171a6be751e3edd8d4a029f1095fcc /src/sliceitoff/game/level.py | |
parent | 607c00bc57fb68572754404cb5da0e7f7a5618e5 (diff) |
lint, refactor, doc, repeat
Diffstat (limited to 'src/sliceitoff/game/level.py')
-rw-r--r-- | src/sliceitoff/game/level.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/sliceitoff/game/level.py b/src/sliceitoff/game/level.py index 26df345..0742213 100644 --- a/src/sliceitoff/game/level.py +++ b/src/sliceitoff/game/level.py @@ -20,7 +20,6 @@ class Level: self.field = Field(stats = self.stats) self.enemies = Enemies(count = self.stats.enemies) self.player = Player() - self.player_single = pygame.sprite.Group() self.level_info = Show(level_screen(stats.level)) self.ended = False @@ -28,7 +27,6 @@ class Level: self.gameplay = Gameplay( player = self.player, - status = self.status, field = self.field, enemies = self.enemies, stats = self.stats) @@ -36,7 +34,8 @@ class Level: self.status, self.field, self.enemies, - self.level_info] + self.level_info, + self.player] def step(self, dt): self.status.update(dt = dt) @@ -53,11 +52,8 @@ class Level: return False else: - self.player_single = pygame.sprite.GroupSingle( - sprite = self.player.get_top_sprite()) self.stats.update_bonus(dt) if self.gameplay.step(): - self.player_single = pygame.sprite.Group() self.ended = True if self.stats.lives: self.endscreen = Show(levelup_screen(self.stats)) @@ -65,6 +61,6 @@ class Level: self.endscreen = Show(gameover_screen()) self.obj_classes.append(self.endscreen) - self.display.update(self.obj_classes+[self.player_single]) + self.display.update(self.obj_classes) return True |