Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- from random import randint
- def easy():
- event = randint(1,10)
- cornersTurned = 0
- death = False
- print("You enter the maze...")
- time.sleep(2)
- while cornersTurned < 5 and death != True:
- print("You reach a corner")
- print("You can turn left (L) or right (R)")
- direction = input()
- print("You turn the corner...")
- time.sleep(3)
- if event <= 8:
- print("Nothing happens and you continue")
- cornersTurned = cornersTurned + 1
- event = randint(1,10)
- else:
- print("You get crushed")
- death = True
- if cornersTurned == 5:
- print("You've reached the end, well done")
- if death == True:
- print("Try again")
- def medium():
- event = randint(1,10)
- cornersTurned = 0
- death = False
- print("You enter the maze...")
- time.sleep(2)
- while cornersTurned < 5 and death != True:
- print("You reach a corner")
- print("You can turn left (L) or right (R)")
- direction = input()
- print("You turn the corner...")
- time.sleep(3)
- if event <= 6:
- print("Nothing happens and you continue")
- cornersTurned = cornersTurned + 1
- event = randint(1,10)
- else:
- print("You get crushed")
- death = True
- if cornersTurned == 5:
- print("You've reached the end, well done")
- if death == True:
- print("Try again")
- def hard():
- event = randint(1,10)
- cornersTurned = 0
- death = False
- print("You enter the maze...")
- time.sleep(2)
- while cornersTurned < 5 and death != True:
- print("You reach a corner")
- print("You can turn left (L) or right (R)")
- direction = input()
- print("You turn the corner...")
- time.sleep(3)
- if event <= 4:
- print("Nothing happens and you continue")
- cornersTurned = cornersTurned + 1
- event = randint(1,10)
- else:
- print("You get crushed")
- death = True
- if cornersTurned == 5:
- print("You've reached the end, well done")
- if death == True:
- print("Try again")
- print("======================================================")
- print("¦Pick your difficulty: [1] Easy [2] Medium [3] Hard¦")
- print("======================================================")
- difficulty = input("-> ")
- while not difficulty.isdigit():
- print("Enter a number from 1 - 3")
- difficulty = int(input("-> "))
- if int(difficulty) == 1:
- easy()
- elif int(difficulty) == 2:
- medium()
- elif int(difficulty) == 3:
- hard()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement