Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sys import exit
- inventory = []
- def start_menu():
- print "Leverage: A Journey Through the Mind"
- print "Use 'examine', 'enter', 'get', and 'return' to navigate."
- print "'start' to begin."
- print "'exit' to exit."
- response = raw_input("> ")
- if response == "start":
- return room_one
- elif response == "exit":
- exit(0)
- else:
- print "Well, make up your mind."
- def room_one():
- print 'You wake up in an uncomfortable bed.'
- print 'Upon furthur investigation, you find a light switch.'
- print 'Lit up by the bare bulb hanging from the ceiling, the room is revealed.'
- print 'It contains a dusty bed and an old nightstand.'
- print 'There is no door.'
- next = raw_input("> ")
- if "examine" in next and "bed" in next:
- print 'It is a very dusty bed with a you-shaped imprint.'
- print ' '
- return room_one
- elif "examine" in next and "nightstand" in next:
- return nightstand
- def nightstand():
- print 'An old nightstand with cracked and peeling paint.'
- print 'There are two drawers, one on top of the other.'
- print 'A rusty hatchet lies on top of the nightstand.'
- next = raw_input("> ")
- if "examine" in next and "top" in next:
- print 'The top drawer opens to reveal a cheery scene.'
- print 'It appears to be a residential street in the 1950s.'
- print 'The sun is shining and children are playing.'
- return top_drawer
- elif "examine" in next and "bottom" in next:
- print 'The bottom drawer opens to reveal a small cottage.'
- print 'The opening in the drawer seems to be under a table in the kitchen.'
- print 'Everything is covered with a thick layer of dust,'
- print 'and little light seeps in through the windows.'
- return bottom_drawer
- elif "get" in next and "hatchet" in next:
- inventory.append('hatchet')
- return nightstand
- elif "return" in next:
- return room_one
- else:
- print "What?"
- print " "
- return nightstand
- f = start_menu
- while f:
- f = f()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement