Exemplo n.º 1
0
 def next_stage(self):
     self._stage += 1
     try:
         self._maze = self._config.stages[self._stage]
         self._keyboard = self._config.stages[self._stage].keyboard
         TextPrinter.print("Stage " + str(self._stage))
     except IndexError:
         TextPrinter.print("You Win!")
         exit()
Exemplo n.º 2
0
def o2s4_locked_door(caller):
    TextPrinter.print("Locked Door")
    if o1s4_key.fullfilled:
        TextPrinter.print("Opened with Key")
        caller.fullfill()
    else:
        TextPrinter.print("Key Missing")
Exemplo n.º 3
0
def o6s4_snake(caller):
    TextPrinter.print("Mini Challenge")
    minigame = Snake(s4_keyboard, 8)
    s4_keyboard.register(KeyBoard.KEY_ID_DOWN, minigame.snake_down)
    s4_keyboard.register(KeyBoard.KEY_ID_UP, minigame.snake_up)
    s4_keyboard.register(KeyBoard.KEY_ID_RIGHT, minigame.snake_right)
    s4_keyboard.register(KeyBoard.KEY_ID_LEFT, minigame.snake_left)

    if minigame.run():
        TextPrinter.print("You Win")
        caller.fullfill()
    else:
        TextPrinter.print("You Lose")

    s4_keyboard.register(KeyBoard.KEY_ID_DOWN, s4_runner.walk_down)
    s4_keyboard.register(KeyBoard.KEY_ID_UP, s4_runner.walk_up)
    s4_keyboard.register(KeyBoard.KEY_ID_RIGHT, s4_runner.walk_right)
    s4_keyboard.register(KeyBoard.KEY_ID_LEFT, s4_runner.walk_left)
Exemplo n.º 4
0
 def maze_exit(caller):
     TextPrinter.print("Maze Exit")
     caller.fullfill()
Exemplo n.º 5
0
 def maze_entry(caller):
     TextPrinter.print("Maze Entry")
Exemplo n.º 6
0
def o5s4_key_found(caller):
    TextPrinter.print("Key Found")
    caller.fullfill()
Exemplo n.º 7
0
def o4s4_teleporter(caller):
    TextPrinter.print("Teleport")
    s4_runner.walk_to(14, 14, False, True)
Exemplo n.º 8
0
def o11s4_teleporter(caller):
    TextPrinter.print("Teleport")
    s4_runner.walk_to(7, 7, False, True)