summaryrefslogtreecommitdiff
path: root/src/sliceitoff/__main__.py
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-03-28 10:00:00 +0200
committerViljami Ilola <+@hix.fi>2024-03-28 10:00:00 +0200
commitda2bb3d8e7dcd7f7f0a0c2d2e214b422350d1993 (patch)
tree980bfb0445110ccb23c451b138edc3863bca7a46 /src/sliceitoff/__main__.py
parentc835fbb83b61a5049bae969b6698d500a0c540d3 (diff)
hiscore name - game.game
Diffstat (limited to 'src/sliceitoff/__main__.py')
-rw-r--r--src/sliceitoff/__main__.py48
1 files changed, 3 insertions, 45 deletions
diff --git a/src/sliceitoff/__main__.py b/src/sliceitoff/__main__.py
index 2ca02f7..971e58c 100644
--- a/src/sliceitoff/__main__.py
+++ b/src/sliceitoff/__main__.py
@@ -2,49 +2,7 @@
the minimum
"""
-from time import sleep
-from pathlib import Path
+from game import Game
-import pygame
-
-from display import Display
-from images import Images, Fonts
-from game import Level, Show
-from stats import Stats
-from screens import welcome_screen
-
-
-def sliceitoff():
- """ The game - It all starts here """
- pygame.init()
-
- pygame.mouse.set_visible(False)
-
- clock = pygame.time.Clock()
-
- display = Display()
- current_path = Path(__file__).parent.resolve()
- Images.load_images( current_path )
- Fonts.load_fonts( current_path )
-
-
- welcome = Show(welcome_screen())
- dt = 0
- while welcome.step(dt):
- dt = clock.tick()
- display.update( [welcome.sprites] )
-
-
- Stats.new_game()
-
- while Stats.lives:
- level = Level(display = display)
- dt = 0
- while level.step(dt):
- dt = clock.tick()
- if Stats.lives:
- Stats.level_up()
-
- pygame.quit()
-
-sliceitoff()
+game = Game()
+game.run()