X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=naja%2Fscenes%2Fhowto.py;h=4d341786d780968b739c96aa6589e39c266f1863;hb=51be7c66a7b60369a7165f3130f13951c21e53fa;hp=5114069eab361447b202b5b9e7765b4a7620a44e;hpb=81317de762b0258c6b4bc9995918cd83dffd4169;p=naja.git diff --git a/naja/scenes/howto.py b/naja/scenes/howto.py index 5114069..4d34178 100644 --- a/naja/scenes/howto.py +++ b/naja/scenes/howto.py @@ -5,9 +5,9 @@ Howto scene. import pygame.locals as pgl from naja.constants import KEYS +from naja.events import SceneChangeEvent from naja.scenes.scene import Scene from naja.widgets.text import TextWidget, TextBoxWidget -from naja.events import SceneChangeEvent class HowtoScene(Scene): @@ -21,34 +21,48 @@ class HowtoScene(Scene): (200, 4), 'How To Play the Game', fontsize=32, colour='white')) self.add(TextBoxWidget( - (0, 40), '\n'.join([ + (10, 50), '\n'.join([ "You are a robot, frantically trying to set the correct " - "bits to gain points for reasons that are unlikely to " - "ever become clear.", + "bits to gain points for reasons that are unlikely ever " + "to become clear.", + "", "You have 8 bits. Four bits control the directions " "you can move in {NORTH,SOUTH,EAST,WEST}, 3 allow you " "to unlock actions {RED,GREEN,BLUE} and the " "last, the Most Significant Bit {MSB}, makes everything " "work better.", + "", "MOVEMENT", + "", "During Movement, you can explore the board and learn about " "the available tiles. Tiles you can legally move onto are " "highlighted. It's always possible to stay in place.", + "", "ACTIONS", + "", "After moving, you must select an action. Some actions " "require the correct bits to be set before they can be " - "selected. After the action, the tile will be replaced.", + "selected. After the action, the tile will be replaced " + "(except in puzzle mode).", + "", "Some actions cost health {HEALTH}. If you run out of " "health {HEALTH}, you lose.", + "", "Some actions gain you points {WINTOKEN}. Once you have " - "enough points, you win the game." + "enough points, you win the game.", + "", + "Some tiles have a countdown timer {COUNTDOWN}. This " + "indicates the number of turns left before something " + "happens. The timer moves faster as the deadline approaches.", + "", + "Press ESC to return to the menu.", ]), fontsize=32, colour='white', padding=1, border=1, bg_colour='black', border_colour='black', - box_width=400)) + box_width=740, view_port=(780, 540))) def handle_scene_event(self, ev): - from naja.scenes.menu import MenuScene + from naja.scenes.introduction import IntroductionScene if ev.type == pgl.KEYDOWN and ev.key in KEYS.QUIT: - SceneChangeEvent.post(MenuScene) + SceneChangeEvent.post(IntroductionScene) return