def convert_key_doors(key_doors, world, player):
    result = []
    for d in key_doors:
        if (type(d) is tuple):
            result.append((world.get_door(d[0], player), world.get_door(d[1], player)))
        else:
            result.append(world.get_door(d, player))
    return result
def convert_key_doors(key_doors, world, player):
    result = []
    for d in key_doors:
        if (type(d) is tuple):
            result.append((world.get_door(d[0], player), world.get_door(d[1], player)))
        else:
            result.append(world.get_door(d, player))
    return result