Skip to content

Instantly share code, notes, and snippets.

@ondoheer
Created August 22, 2017 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ondoheer/c9c0ec1153be4268b6b6ab2aef4a6553 to your computer and use it in GitHub Desktop.
Save ondoheer/c9c0ec1153be4268b6b6ab2aef4a6553 to your computer and use it in GitHub Desktop.
Valentin first refactoring
stumble_around = "You stumble around and fall in a knife. Good job!"
def start_room():
print "You enter a dark room with two doors. Do you go through door #1 or #2?"
door = raw_input("> ")
if door == "1":
bear_room()
elif door == "2":
pit_fall()
else:
print stumble_around
def bear_room():
print "Inside the room you find a giant bear eating a cheasecake. what do you do?"
print "#1 Do you take the cheasecake?"
print "#2 Do you run away?"
global bear
bear = raw_input("> ")
if bear == "1":
print "The bear eats your face off. Good job!"
elif bear == "2":
print "The bear eats your leg off. Good job!"
else:
defeat_bear()
def pit_fall():
print "Its a trap! You fall into a gigant pitfall. Good job!"
def defeat_bear():
print "you attack the bear with %s(oh, boi soo creative)!" % bear
print "bear faited!"
print "attack %s leveled up!" % bear
start_room()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment