title: I'm getting confused with objects and classes
body: <p>I am trying to make a text based adventure game, i am getting heavily confused with passing around objects and classes to be able to move from room to room etc. I have made a mess of my code, i am only starting to learn python.</p>
  
  <p>I've tried just a dictionary of variables, classes on there own and i kept getting errors for not being able to call their attributes</p>
  
  <p>The problem is that i want to be able to change the location of adventurer to the 'west' of the starting room and then be able to use that location to check in the world dictionary when moving back and forth the rooms.</p>
  
  <pre class="lang-py prettyprint-override"><code>destination = world[character.location].east 
  character.location = destination
  </code></pre>
  
  <p>This does not work ^ </p>
  
  <p>it doesn't change character.location</p>
  
  <pre class="lang-py prettyprint-override"><code>import os
  import time
  import sys
  
  class Adventurer:
      def __init__(self, starting):
          self.name = ''
          self.inv = []
          self.location = starting
          self.game_over = False
  
  class Item:
      def __init__(self, name, info, location):
          self.name = name
          self.info = info
          self.location = world[location]
  
  class Room:
      def __init__(self, name, description, north, south, east, west, roominv):
          self.name = name
          self.description = description
          self.north = north
          self.south = south
          self.east = east
          self.west = west
          self.roominv = roominv
  
  def prompt():
      print("\n" + "=============================")
      print("Please enter a command")
      command = input("&gt; ")
      available_commands = ['east', 'west', 'look']
      while command.lower() not in available_commands:
          print("Unknown command, if you need help with commands try 'help'" + "\n")
          command = input("&gt; ")
      if(command.lower() == 'quit'):
          sys.exit()
      elif(command.lower() in ['west', 'go west', 'w']):
          if move_check(world[character.location].west):
              destination = world[character.location].west
              movement_handler(destination)
      elif(command.lower() in ['east', 'go east', 'e']):
          if move_check(world[character.location].east):
              destination = world[character.location].east
              movement_handler(destination)
      elif(command.lower() == 'look'):
          print(world[character.location].name)
  
  def move_check(direction):
      if direction == 'NA':
          print("You cannot go this direction.\n")
          return False
      else:
          return True
  
  def movement_handler(destination):
      print("You head to the " + destination + ".")
      character.location = destination
  
  def main_game_loop():
      while character.game_over is False:
          prompt()
  
  def start_game():
      os.system('cls')
      question1 = ("What would you like to name your character?\n")
      message_write(question1)
  
      character_name = input("&gt; ")
      character.name = character_name
  
      welcome = "Welcome " + character_name + "\n"
      message_write(welcome)
      speech1 = "You awake in a dark room with no memory of how you got there.\n"
      speech2 = "You must find a way out or be stuck forever.\n"
      message_write(speech1)
      message_write(speech2)
  
      time.sleep(1)
      os.system('cls')
      print("#############")
      print("#   START   #")
      print("#############")
      print('\n')
  
      main_game_loop()
  
  def message_write(message):
      for char in message:
          sys.stdout.write(char)
          sys.stdout.flush()
          time.sleep(0.01)
  
  starting = ''
  candle = ''
  
  world = {
      starting: Room("Starting Room", "You are in a dark room with nothing around", "NA", "NA", "NA", 'candle', []),
      candle: Room("Candle Room", "It is cold but there are unlit candles in the corner of the room", "NA", "NA", 'starting', "NA", [])
      }
  
  
  
  character = Adventurer(starting)
  
  start_game()
  </code></pre>