def find_inaccessible_regions(world, player):
    world.inaccessible_regions[player] = []
    if (world.mode[player] != 'inverted'):
        start_regions = ['Links House', 'Sanctuary']
    else:
        start_regions = ['Inverted Links House', 'Inverted Dark Sanctuary']
    regs = convert_regions(start_regions, world, player)
    all_regions = set([r for r in world.regions if ((r.player == player) and (r.type is not RegionType.Dungeon))])
    visited_regions = set()
    queue = deque(regs)
    while (len(queue) > 0):
        next_region = queue.popleft()
        visited_regions.add(next_region)
        if (next_region.name == 'Inverted Dark Sanctuary'):
            for ent in next_region.entrances:
                parent = ent.parent_region
                if (parent and (parent.type is not RegionType.Dungeon) and (parent not in queue) and (parent not in visited_regions)):
                    queue.append(parent)
        for ext in next_region.exits:
            connect = ext.connected_region
            if (connect and (connect.type is not RegionType.Dungeon) and (connect not in queue) and (connect not in visited_regions)):
                queue.append(connect)
    world.inaccessible_regions[player].extend([r.name for r in all_regions.difference(visited_regions) if valid_inaccessible_region(r)])
    if (world.mode[player] == 'standard'):
        world.inaccessible_regions[player].append('Hyrule Castle Ledge')
        world.inaccessible_regions[player].append('Sewer Drop')
    logger = logging.getLogger('')
    logger.debug('Inaccessible Regions:')
    for r in world.inaccessible_regions[player]:
        logger.debug('%s', r)
def find_inaccessible_regions(world, player):
    world.inaccessible_regions[player] = []
    if (world.mode[player] != 'inverted'):
        start_regions = ['Links House', 'Sanctuary']
    else:
        start_regions = ['Inverted Links House', 'Inverted Dark Sanctuary']
    regs = convert_regions(start_regions, world, player)
    all_regions = set([r for r in world.regions if ((r.player == player) and (r.type is not RegionType.Dungeon))])
    visited_regions = set()
    queue = deque(regs)
    while (len(queue) > 0):
        next_region = queue.popleft()
        visited_regions.add(next_region)
        if (next_region.name == 'Inverted Dark Sanctuary'):
            for ent in next_region.entrances:
                parent = ent.parent_region
                if (parent and (parent.type is not RegionType.Dungeon) and (parent not in queue) and (parent not in visited_regions)):
                    queue.append(parent)
        for ext in next_region.exits:
            connect = ext.connected_region
            if (connect and (connect.type is not RegionType.Dungeon) and (connect not in queue) and (connect not in visited_regions)):
                queue.append(connect)
    world.inaccessible_regions[player].extend([r.name for r in all_regions.difference(visited_regions) if valid_inaccessible_region(r)])
    if (world.mode[player] == 'standard'):
        world.inaccessible_regions[player].append('Hyrule Castle Ledge')
        world.inaccessible_regions[player].append('Sewer Drop')
    logger = logging.getLogger()
    logger.debug('Inaccessible Regions:')
    for r in world.inaccessible_regions[player]:
        logger.debug('%s', r)