Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. def center_room():
  2.     global wumpus_room
  3.     print "You find yourself in a large cavern."
  4.     print "There are passages dug into the North, South, East, and West walls."
  5.     print "The Wumpus you have chased into this cavern could be down any of these passages."
  6.     print "You may peer into, shoot into or walk into the passages to the North,."
  7.     print "South, East, or West. For example peer north, or walk east, or shoot west."
  8.     print "\n"
  9.    
  10.     choice = raw_input("> ")
  11.    
  12.     if choice.lower() == "peer north":
  13.         if rooms[wumpus_room] == "North":
  14.             print("You see vague movements in the shadows")
  15.         else:
  16.             print("Nothing seems amiss")          
  17.        
  18.     elif choice.lower() == "shoot north":
  19.         # check for win or put the Wumpus somewhere else
  20.         if rooms[wumpus_room] == "North":
  21.             print "You killed the wumpus!"
  22.             exit(0)
  23.         else:
  24.             print "You missed! The wumpus could be anywhere now!!!"
  25.             wumpus_room = random.randint(0, 3)            
  26.          
  27.     else:
  28.         print "I don't understand...\n"
  29.         center_room()