Created
August 22, 2017 14:24
-
-
Save ondoheer/c9c0ec1153be4268b6b6ab2aef4a6553 to your computer and use it in GitHub Desktop.
Valentin first refactoring
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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