Advertisement
Guest User

Basic Logic Game

a guest
Apr 18th, 2012
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.14 KB | None | 0 0
  1. # Functions
  2. def treasure_room():
  3.     print "YOU WIN"
  4.    
  5. def dungeon_room():
  6.     print "This creepy room, may appear scary but is the last room,"
  7.     print "that is in the way of you and potentially all the money:"
  8.     print "\tthe inscription asks 'how much thy taketh from the tomb'"
  9.     taketh = float(input("> "))
  10.     if taketh <= '50':
  11.         treasure_room()
  12.     elif taketh > '50':
  13.         trap2()
  14.     else:
  15.         entrance()
  16.    
  17. def entrance():
  18.     while True:
  19.         print "Welcome to the entrance of the mansion,"
  20.         print "this is where you must decide which path"
  21.         print "that you are willing to go down."
  22.         print "[1] Left or [2] Right"
  23.         path = int(raw_input("> "))
  24.         if path == '1':
  25.             dungeon_room()
  26.             exit(0)
  27.         elif path == '2':
  28.             trap2()
  29.             exit(0)
  30.         else path == not('1' or '2'):
  31.             print "Please select one of the options"
  32.             entrance()
  33.             exit(0)
  34.    
  35. def trap1():
  36.     #
  37.    
  38. def trap2():
  39.     #
  40.    
  41. # MENU
  42.  
  43. menu = """
  44. /t[1] EXIT
  45. /t[2] EXIT
  46. """
  47.  
  48. print menu
  49.  
  50. # User Selection
  51.  
  52. option = int(raw_input("> "))
  53. print option
  54. if option == '1':
  55.     entrance()
  56. elif option == '2':
  57.     trap1()
  58. else option != '1' or '2':
  59.     print "Please select one of the options [1] or [2]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement