gold = 0 def start(): #send the player the to correct area room = 0 while True: if(room == 0): room = room0() elif room == 1: room = room1() elif room == 3: break print("You've found " + str(gold) + " gold.") print("you escaped") def room0(): print("This is a dark room.") choice = -1 choice = input("1) North \n2) West\n") print(choice) if choice == "1": return 1 if choice == "2": return 3 def room1(): print("This looks like a library.") global gold gold = gold + 5 print("You found 5 more gold.") choice = -1 choice = input("1) South \n2) Stay here\n") print(choice) if choice == "1": return 0 if choice == "2": return 1