示例#1
0
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.")
示例#2
0
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?")
示例#3
0
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()
示例#4
0
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?")
示例#5
0
def maps():
	if "M" in maze.get_inventory():
			maze.print_maze()
	else:
		print ("you don't have a map!")
示例#6
0
    



while True :
    print("Welcome to the Maze Game in this game you will looka round rooms and ")
	user_input = input("what is the next command master: ")
	if user_input == "look around":
		maze.look_around()
	elif user_input in list_dir:
		direction()
	elif user_input == "look":
		look()
	elif user_input == "e":
		add_to_inventory()
	elif user_input == "inventory":
		print(maze.get_inventory())
	elif user_input == "m":
		maps()
	elif user_input == "o":
		if open_door() == False:
			break
	elif user_input == "k":
		if kill() == False:
			break
	elif user_input == "b":
		bribe()