def direction(): main_space = maze.get_current_space() for i in list_dir: if user_input == i: if check_valid_move(list_dir[i]): maze.move(list_dir[i]) maze.look_around() else: print("There is a wall/!")
def bribe(): curntLocation = maze.get_current_space() if curntLocation == "S": if "C" in maze.get_inventory(): print ("you have bribed the snake!") maze.get_inventory().remove("C") else: print ("You don't have anything the bribe the snake") else: print ("there is no snake, dummy.")
def kill(): curntLocation = maze.get_current_space() if curntLocation == "S": if "W" in maze.get_inventory(): print ("You have killed the snake!") maze.get_inventory().remove("W") maze.remove_item_from_space() else: print ("you don't have anything to kill the snake. So you are dead") return False else: print ("there is no snake what the hack do you want me to kill?")
def open_door(): curntLocation = maze.get_current_space() if curntLocation == "D": for n in maze.get_inventory(): if n == "K": print("You have escaped!") return False else: print ("You stupid, how are you gonna open the door if you don't have a key?") return True else: print("There is no door what the hack do you want me to open? dumb...dumb...") maze.look_around()
def add_to_inventory(): currLoc = maze.get_current_space() if currLoc == "K": maze.get_inventory().append(currLoc) maze.remove_item_from_space() print ( "You have picked up a key!") elif currLoc == "M": maze.get_inventory().append(currLoc) maze.remove_item_from_space() print("You have picked up a map!") elif currLoc == "C": maze.get_inventory().append(currLoc) maze.remove_item_from_space() print ( "You have picked up a coin!") elif currLoc == "W": maze.get_inventory().append(currLoc) maze.remove_item_from_space() print ("You have picked up a sword!") else: print("You are so dumb, how do you pick up something when nothing is there?")
def look(): print ( maz_character_to_description[maze.get_current_space()])