def build_projects(projects):
    build_queue = list()
    while True:
        has_new_build = False
        for project in projects:
            if (project.state == 0):
                if (build_project(project) == True):
                    build_queue.append(project.name)
                    project.state = 1
                    has_new_build = True
        if (has_new_build == False):
            break
    is_built_all = True
    for project in projects:
        if (project.state == 0):
            is_built_all = False
            break
    if is_built_all:
        return build_queue
    else:
        return False
def build_projects(projects):
    build_queue = list()
    while True:
        has_new_build = False
        for project in projects:
            if (project.state == 0):
                if (build_project(project) == True):
                    build_queue.append(project.name)
                    project.state = 1
                    has_new_build = True
        if (has_new_build == False):
            break
    is_built_all = True
    for project in projects:
        if (project.state == 0):
            is_built_all = False
            break
    if is_built_all:
        return build_queue
    else:
        return False