# Define Rooms rooms = { 'start': { 'name': 'Start', 'description': "You find yourself in the dimly lit hallway. The walls are bare and you notice several doors leading to different rooms.", 'north': 'hallway' }, 'hallway': { 'name': 'Hallway', 'description': "A long corridor with no visible exits." } } # Define Player State player = { 'current_room': 'start', 'inventory': [] } def move(current_room, direction): return rooms[current_room][direction] def look(): current_room_name = player['current_room'] print(rooms[current_room_name]['name']]) if current_room_name == 'hallway': print("There are several doors leading to different rooms.") else: print("You see a door to the north.") while True: action = input("What do you want to do? Type 'look', 'move north', or 'quit' to exit: ") if action == 'look': look() elif action == 'move north': current_room_name = player['current_room'] result = move(current_room_name, 'north') if isinstance(result, str): print(result) else: player['current_room'] = result look() elif action == 'quit': print("Goodbye!") break