'Python text adventure game, ending loop

I am stuck on ending my game and breaking the loop. I have tried rephrasing, putting it in different spots, etc. The game-ending parameter is that if you reach the State of Florida with all six items you win, otherwise you lose. Instead, I can get to that final room and it either continues to prompt for input or announces that you've won the game even if you didn't.

print("\nMovement commands : North, South, East, or West")
print("Add to inventory: Get item\n")
introduction() # I just cut my long-winded intro. it works.

rooms = {
    'House': {'north': 'Drug Store', 'south': 'Clinic', 'east': 'Kitchen', 'west': 'Craft Store'},
    'Drug Store': {'south': 'House', 'east': 'Electronics Store', 'item': 'Hand Sanitizer'},
    'Electronics Store': {'west': 'Drug Store', 'item': 'ANC Headphones'},
    'Craft Store': {'east': 'House', 'item': 'A Mask'},
    'Clinic': {'north': 'House', 'east': 'CDC', 'item': 'A Vaccine'},
    'CDC': {'west': 'Clinic', 'item': 'Dr Fauci Candle'},
    'Kitchen': {'west': 'House', 'north': 'State of Florida', 'item': 'Anti-viral Spray'},
    'State of Florida': {'item': 'COVID-19'}  # VILLAIN, final room
}

current_room = 'House'  # location variable that will change as player moves
inventory = []  # empty list that will fill as you collect items
directions = ('north', 'south', 'east', 'west')  # possible movements
item = ('hand sanitizer', 'anc headphones', 'a mask', 'a vaccine', 'dr fauci candle',
        'anti-viral spray', 'covid-19') 

while True:
    print('\nYou are in the {}'.format(current_room)) # current game status
    print('Inventory: {}'.format(inventory))
    if 'item' not in rooms[current_room]:
        pass
    else:
        print('You see {}'.format(rooms[current_room]['item']))
    print('-' * 25)

    command = input('Enter your move:\n').lower().strip()

I initially put my game ending statement here, but it just loops again and then you're stuck in Florida forever because there is no room attached to it in the dictionary

if command in directions:
    if command in rooms[current_room]:
        current_room = rooms[current_room][command]
        if current_room in ['State of Florida']:
            if len(inventory) == 6:
                print('You have contracted COVID-19! G A M E  O V E R')
            else:
                print('You have defeated COVID-19!')
                print('Thank you for protecting your fellow teammates.')
            break

It has you win the game when you get here, regardless of inventory requirement (I have tried this as:) if len(inventory) == 6 and 'item' == 'COVID-19' print win if len(inventory) != 6 and 'item' == 'COVID-19' print lose

    else:
        print('You cannot go that way, please stop running into brick walls.')

elif command == 'get item':
    if 'item' in rooms[current_room]:
        print('{} retrieved! Gold star!'.format(rooms[current_room]['item']))
        inventory.append(rooms[current_room]['item'])
        del rooms[current_room]['item']
    else:
        print('FOCUS! There is nothing in here.')

else:
    print('What did you just call me? RUDE. Try again.')


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source