Advertisement
Guest User

main.py

a guest
Dec 16th, 2013
537
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.52 KB | None | 0 0
  1. #-------------------------------------------------------------------------------
  2. # Name:        main.py
  3. # Purpose:     An RPG (Roll playing game) where you wake up in a room and have
  4. #              to figure out text based puzzles to escape.
  5. #              The whole game will be done in a terminal (Shell) and will be
  6. #              completely text and assci code. This will be the main file.
  7. #
  8. # Author:      William
  9. #
  10. # Created:     15/12/2013
  11. # Copyright:   (c) William 2013
  12. #-------------------------------------------------------------------------------
  13.  
  14. import time
  15. import assci
  16. import helper
  17.  
  18. #if the file is the main file or if it isn't, do something
  19. def name_main():
  20.     if __name__ == '__main__':
  21.         init()
  22.  
  23. #The function that starts/restarts the game
  24. def init():
  25.     """
  26.    Calls all the functions to start the game/ restart the game
  27.    """
  28.     #Display a cool banner
  29.     assci.ywu_banner(2)
  30.  
  31.     START_INPUT = input("Press ENTER/RETURN on your keyboard to start the game")
  32.     time.sleep(0.7)
  33.     assci.clear()
  34.  
  35.     #Game text.
  36.     game_text()
  37.  
  38. #The text which is the main story line after the banner which gives the player
  39. #A sense of what the setting is about
  40. def game_text():
  41.     """
  42.    Prints out a bit of text 2 lines down and clears the screen every 4 or so
  43.    seconds.
  44.    """
  45.     time.sleep(5)
  46.  
  47.     print("\n\nYour eyes gradually open")
  48.     time.sleep(4)
  49.     assci.clear()
  50.     time.sleep(2)
  51.  
  52.     print("\n\nAfter waking up, you slowly gather your senses and sit up...")
  53.     time.sleep(4.5)
  54.     assci.clear()
  55.     time.sleep(2)
  56.  
  57.     print("\n\nYou look around the room, and unexpectidly, you realise your in some sort of a prison cell!")
  58.     time.sleep(4)
  59.     assci.clear()
  60.     time.sleep(2)
  61.  
  62.     print("\n\nIt's a sqaure room made of iron.")
  63.     time.sleep(4)
  64.     assci.clear()
  65.     time.sleep(2)
  66.  
  67.     print("\n\nHow did I get here? -You think to yourself")
  68.     time.sleep(4)
  69.     assci.clear()
  70.     time.sleep(2)
  71.  
  72.     helper.way_out_quest()
  73.  
  74.     assci.clear()
  75.     time.sleep(2)
  76.  
  77.     print("\n\nYou see a wooden door with 5 buttons and a handel...  " + assci.WOODEN_DOOR)
  78.     time.sleep(6)
  79.     assci.clear()
  80.     time.sleep(2)
  81.  
  82.     print("\n\nWhat was that? ...you think to your self.")
  83.     time.sleep(4)
  84.     assci.clear()
  85.     time.sleep(2)
  86.  
  87.     print("\n\nWhat was that? ...you think to your self.")
  88.     time.sleep(4)
  89.     assci.clear()
  90.     time.sleep(2)
  91.  
  92.     print("\n\nYou look around the room and walk slowly towards the iron door..")
  93.     time.sleep(4)
  94.     assci.clear()
  95.     time.sleep(2)
  96.  
  97. #Call name_main to test whether it's the main file.
  98. name_main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement