summaryrefslogtreecommitdiff
path: root/src/sliceitoff/game
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-04-08 02:55:25 +0300
committerViljami Ilola <+@hix.fi>2024-04-08 02:55:25 +0300
commit74a735a7878bc76d01b644505f674cfe7bebd058 (patch)
tree6c7f64b88abffe9cdecb655ed950ac34485bbeaf /src/sliceitoff/game
parenteeac2c3bd87c542c48c806a98ea8c7c22db6dfc2 (diff)
instructions screens
Diffstat (limited to 'src/sliceitoff/game')
-rw-r--r--src/sliceitoff/game/game.py18
1 files changed, 11 insertions, 7 deletions
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):