summaryrefslogtreecommitdiff
path: root/src/sliceitoff/__main__.py
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-03-18 12:41:49 +0200
committerViljami Ilola <+@hix.fi>2024-03-18 12:41:49 +0200
commit6eff6d1d8779480c5fb56a9b7fa619209da45423 (patch)
tree46732aeae2b8c07b74f01cc581ed09a86f66b494 /src/sliceitoff/__main__.py
parent0442a8e0836c57418375a1f1f923ba4b9f84d01e (diff)
status -> no get_sprites, separate update
Diffstat (limited to 'src/sliceitoff/__main__.py')
-rw-r--r--src/sliceitoff/__main__.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/sliceitoff/__main__.py b/src/sliceitoff/__main__.py
index df4ba22..68fca86 100644
--- a/src/sliceitoff/__main__.py
+++ b/src/sliceitoff/__main__.py
@@ -30,18 +30,24 @@ def sliceitoff():
game = Game(player = player)
clock = pygame.time.Clock()
-
- for _ in range(6000):
- if game.step():
- break
+
+
+ while True:
+
+ dt = clock.tick(60)
+ for fun in (status, status):
+ fun.update(dt)
+
display.update(
[
- status.get_sprites(),
+ status.sprites,
field.get_sprites(),
enemies.get_sprites(),
player.get_sprites()
])
- clock.tick(60)
+
+ if game.step():
+ break
sleep(2)
pygame.quit()