title: Having trouble setting up inventory
body: <p>I'm working on a text-based game where the player had to find 6 items in different rooms before running into the boss or they die. I have the items set in the dict with the rooms but I don't know how to pull from it as the player moves around. What I have currently have has the player able to add things to the inventory but then it's stuck in a permanent loop. I am very new at this and I am having trouble connecting things together. Here is the whole thing with comments.</p>
  <pre><code>rooms = {
  
      'Entry Way': { 'North': 'Stalagmite Cavern'},
      'Stalagmite Cavern': {'North': 'Grand Cavern', 'South': 'Entry Way', 'item': 'torch'},
      'Grand Cavern': {'North': 'Hallway', 'East': 'Armory', 'West': 'Bedroom', 'South': 'Stalagmite Cavern', 'item': 'cross'},
      'Armory': {'North': 'Treasure Trove', 'West': 'Grand Cavern', 'item': 'Stake'},
      'Treasure Trove': {'South': 'Armory', 'item': 'silver'},
      'Bedroom': {'North': 'Storage', 'East': 'Grand Cavern', 'item': 'elaborate comb'},
      'Storage': {'South': 'Bedroom', 'item': 'mirror'},
      'Hallway': {'North': 'Cliff Top', 'South': 'Grand Cavern'},
      'Cliff Top': {'South': 'Hallway', 'item': 'Orla'}
  }
  
  def show_instructions():
     #print a main menu and the commands
     print(&quot;Thousand Year Vampire&quot;)
     print(&quot;Collect 6 items to defeat the vampire or be destroyed by her.&quot;)
     print(&quot;Move commands: go South, go North, go East, go West&quot;)
     print(&quot;Add to Inventory: get 'item name'&quot;)
  
  def show_status():
      print(current_room)
      print(inventory)
      #print the player's current location
      #print the current inventory
      #print an item if there is one
  
  # setting up inventory
  inventory = []
  
  def game():
      inventory = []
      # simulate picking up items
      while True:
          item = input()
          if item in inventory:  # use in operator to check membership
              print(&quot;you already have got this&quot;)
              print(&quot; &quot;.join(inventory))
          else:
              print(&quot;You got &quot;, item)
              print(&quot;its been added to inventory&quot;)
              inventory.append(item)
              print(&quot; &quot;.join(inventory))
  
  # setting the starting room
  starting_room = 'Entry Way'
  
  # set current room to starting room
  current_room = starting_room
  
  #show game instructions
  show_instructions()
  
  show_status()
  
  
  while True:
      print(&quot;\nYou are currently in the {}&quot;.format(current_room))
      move = input(&quot;\n&gt;&gt; &quot;).split()[-1].capitalize()
      print('-----------------------------')
  
      # user to exit
      if move == 'Exit':
          current_room = 'exit'
          break
  
      # a correct move
      elif move in rooms[current_room]:
          current_room = rooms[current_room][move]
          print('inventory:', inventory)
  
  
      # incorrect move
      else:
          print(&quot;You can't go that way. There is nothing to the {}&quot;.format(move))
  
  #loop forever until meet boss or gets all items and wins
  </code></pre>