Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-------------------------------------------------------------------------------
- # Name: helper
- # Purpose: To contain helper functions for the game "Yoy wake up..."
- #
- # Author: William
- #
- # Created: 17/12/2013
- # Copyright: (c) William 2013
- #-------------------------------------------------------------------------------
- import time
- import assci
- import main
- #Error message if user executes the wrong file.
- if __name__ == '__main__':
- print("[ERROR]: Do not run this file. Run main.py - this file should not be executed!")
- time.sleep(4)
- exit()
- #Function for the first quest: do you want to find a way out?
- def way_out_quest():
- """
- If the question is not answered, then the player can't move on. If they say
- yes, then they continue through the script. If they say no, then the init
- function is called from main.py
- """
- way_out_answered = False
- while way_out_answered == False:
- WAY_OUT_INPUT = input("Quest: Do you want to find a way out? ")
- if WAY_OUT_INPUT in ["yes", "Yes", "YES"]:
- way_out_answered = True
- elif WAY_OUT_INPUT in ["no", "No", "NO"]:
- way_out_answered = True
- time.sleep(2)
- assci.clear()
- print("GAME\nOVER!")
- time.sleep (5)
- assci.clear()
- main.init()
- else:
- print("Type yes or no. ")
- time.sleep(4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement