Update on this issue:
I had to create a dictionary and add the rooms to it, then call the room function at my if statement.
I had to create a dictionary and add the rooms to it, then call the room function at my if statement.
class room(): def __init__(self, desc, exit, details): self.desc = desc self.exit = exit self.details = details world = {} world['door'] = room('You see a door.', 'entrance', 'Test') world['entrance'] = room("You are in the entrance.", 'door', 'A white door blocks your way.') world['hall'] = room('You are in the Hall.', ('entrance', 'bedroom'), 'The hardwood floor is scuffed and there is a mirror on the wall.') world['bedroom'] = room('You are in a bedroom.', 'hall', 'There is only an old metal framed bed and a worn dresser.') currentRoom = world['bedroom'] def playerAction(): print(currentRoom.desc) print('Exits:', currentRoom.exit) print('************************') time.sleep(0.5) while True: playerAction() action = input('What do you do? >') #Defines what to do with the inputs if action in currentRoom.exit : currentRoom = world[action]