Advertisement
desousam

bear game

May 12th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.31 KB | None | 0 0
  1. import time
  2. attempts = 0
  3. print "You walk into a room with six doors. There is a sign that says 'You have 3 attempts.' Do you enter door #1, door #2, door #3, door #4, door #5, or door #6?"
  4. global door
  5.  
  6. def wtf():
  7. door = raw_input("> ")
  8. def question_v2():
  9. print "-" * 30
  10. print "I guess that didn't work out for you. You have %r attempts left. Do you go through door #1, door #2, door #3, door #4, door #5, or door #6? Please type the number, enter, type the number again and hit enter again to make your selection." % (3-attempts)
  11. door = raw_input("> ")
  12. def door1():
  13. global attempts
  14. attempts += 1
  15. print "There's a giant bear here eating a cheese cake. What do you do?"
  16. print "1. Take the cake."
  17. print "2. Scream at the bear."
  18. bear = raw_input("> ")
  19. if bear == "1":
  20. print "The bear eats your face off. Good job!"
  21. time.sleep(1.2)
  22. question_v2()
  23.  
  24. elif bear == "2":
  25. print "The bear eats your legs off. Good job!"
  26. time.sleep(1.2)
  27. question_v2()
  28. else:
  29. print "Well, doing %s is probably better. The bear runs away! But you haven't won yet." % bear
  30. time.sleep(1.2)
  31. question_v2()
  32.  
  33. def door2():
  34. global attempts
  35. attempts += 1
  36. print "You stare into the endless abyss at Cthulhu's retina."
  37. print "1. Blueberries."
  38. print "2. Yellow jacket clothespins."
  39. print "3. Understanding revolvers yelling melodies."
  40.  
  41. insanity = raw_input("> ")
  42.  
  43. if insanity == "1" or insanity == "2":
  44. print "Your body survives but is powered by a mind of jello."
  45. time.sleep(1.2)
  46. question_v2()
  47. else:
  48. print "The insanity rots your eyes into a pool of muck."
  49. time.sleep(1.2)
  50. question_v2()
  51.  
  52. def door3():
  53. global attempts
  54. attempts += 1
  55. print "A wild possum is sitting in the room cross legged, eating an apple. He asks you why you are there in Pepuli, the language of Possums."
  56. print "1. You tell him that you are there for the job interview."
  57. print "2. You stand there, confused as to how a possum is talking and you are understanding it."
  58. print "3. You turn around and leave."
  59. ay_dios_mio = raw_input(">")
  60. if ay_dios_mio == "1":
  61. print "He proceeds to interview you for a job working with Python. After the interview, he notifies you that you got the job. Congratulations, you won!"
  62. win()
  63. elif ay_dios_mio == "2":
  64. print "The possum gets angry and rips your face off."
  65. time.sleep(1.2)
  66. question_v2()
  67. elif ay_dios_mio == "3":
  68. print "You trip on the way out and fall onto an apple, crushing it. It was the possum's. It gets angry and tears your legs to bits."
  69. time.sleep(1.2)
  70. question_v2()
  71. else:
  72. print "That wasn't one of the options."
  73. time.sleep(1.2)
  74. question_v2()
  75.  
  76. def door4():
  77. global attempts
  78. attempts += 1
  79. print "You stub your toe on the door while walking in."
  80. print "1. You say a curse word."
  81. print "2. You wish for band-aid."
  82. print "3. You cry."
  83. mankdemes = raw_input(">")
  84. if mankdemes == "1":
  85. print "A large walrus shows up and smacks you for cursing."
  86. time.sleep(1.2)
  87. question_v2()
  88. elif mankdemes == "2":
  89. print "A large walrus shows up with a band-aid. He gives it to you, calls you an idiot, and leaves. You feel sad."
  90. time.sleep(1.2)
  91. question_v2()
  92. elif mankdemes == "3":
  93. "A large walrus shows up with a cheesecake. He says he stole it from a bear and offers it to you. You accept and eat it. You feel happy but stuffed. The walrus wishes you good luck and goes on his way."
  94. time.sleep(1.2)
  95. question_v2()
  96.  
  97. def door5():
  98. global attempts
  99. attempts += 1
  100. print('After you open the door you fall into a well and then faint.')
  101. time.sleep(.2)
  102. print('.')
  103. time.sleep(.2)
  104. print('.')
  105. time.sleep(.2)
  106. print('.')
  107. time.sleep(.2)
  108. print('')
  109. question_v2()
  110.  
  111. def door6():
  112. global attempts
  113. attempts += 1
  114. print "You walk into a dark room and with a single ray of light you see someone playing a game."
  115. time.sleep(1.2)
  116. question_v2()
  117.  
  118. def win():
  119. time.sleep(1.2)
  120. print "-" * 30
  121. print "Congratulations! You have won with %r attempts left!" % (3 - attempts)
  122. exit(0)
  123.  
  124. if door == "1":
  125. door1()
  126. elif door == "2":
  127. door2()
  128. elif door == "3":
  129. door3()
  130. elif door == "4":
  131. door4()
  132. elif door == "5":
  133. door5()
  134. elif door =="6":
  135. door6()
  136.  
  137. else:
  138. global attempts
  139. attempts += 1
  140. print "You stumble around and fall on a knife and die. Good joab!"
  141. time.sleep(1.2)
  142. question_v2()
  143. while attempts <= 3:
  144. wtf()
  145. else:
  146. print "Game over. Please try again."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement