From 74a735a7878bc76d01b644505f674cfe7bebd058 Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Mon, 8 Apr 2024 02:55:25 +0300 Subject: instructions screens --- src/sliceitoff/game/game.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/sliceitoff/game') diff --git a/src/sliceitoff/game/game.py b/src/sliceitoff/game/game.py index fea5151..9afe342 100644 --- a/src/sliceitoff/game/game.py +++ b/src/sliceitoff/game/game.py @@ -9,7 +9,10 @@ import pygame from display import Display from text import Fonts from stats import Stats -from screens import welcome_screen, hiscores_screen +from screens import ( + hiscores_screen, + instructions1_screen, + instructions2_screen) from hiscores import HiScores from mainmenu import Mainmenu, MenuItems @@ -31,12 +34,13 @@ class Game: def __del__(self): pygame.quit() - def welcome(self): + def instructions(self): """ displays instruction and waits a key """ - ws = Show(welcome_screen()) - while ws.active: - ws.update(dt = self.clock.tick()) - self.display.update( [ws] ) + for page in [instructions1_screen, instructions2_screen]: + screen = Show(page()) + while screen.active: + screen.update(dt = self.clock.tick()) + self.display.update( [screen] ) def show_highscores(self): """ displays highscores and waits a key """ @@ -81,7 +85,7 @@ class Game: case MenuItems.HISCORES: self.show_highscores() case MenuItems.INSTRUCT: - self.welcome() + self.instructions() case MenuItems.NEWGAME: self.newgame() if self.hiscores.high_enough(self.stats.score): -- cgit v1.2.3