From 78704848d4459907a456044615714b59d4593b2f Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Mon, 18 Mar 2024 18:08:20 +0200 Subject: stats, level_up, game_over --- src/sliceitoff/__main__.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/sliceitoff/__main__.py') diff --git a/src/sliceitoff/__main__.py b/src/sliceitoff/__main__.py index 17e7317..4e5a626 100644 --- a/src/sliceitoff/__main__.py +++ b/src/sliceitoff/__main__.py @@ -10,24 +10,29 @@ import pygame from display import Display from images import Images, Fonts from game import Level +from stats import Stats def sliceitoff(): """ The game - It all starts here """ pygame.init() + + pygame.mouse.set_visible(False) display = Display() current_path = Path(__file__).parent.resolve() Images.load_images( current_path ) Fonts.load_fonts( current_path ) - level1 = Level(display = display, level = 10, score = 10) - clock = pygame.time.Clock() dt = 0 + + Stats.new_game() - while level1.step(dt): - dt = clock.tick() + while Stats.lives: + level = Level(display = display) + while level.step(dt): + dt = clock.tick() pygame.quit() -- cgit v1.2.3