def principal(nbiteration, a, b):
    c = deepcopy(a)
    score = 0
    i = 0
    while i < nbiteration and score < vivants:
        c, score = iteration.avance(c, b, score)
        i += 1
    return (i, score)
def calcul():
    global score
    global a
    c, score = iteration.avance(a, b, score)
    for x in range(n):
        for y in range(n):
            canvas.itemconfig(couleur[x][y], fill=dico[c[x][y]])
    a = deepcopy(c)
示例#3
0
def principal(nbiteration):
    a = baground.baground_test1(n)
    b = strategie.strategie(a)
    c = iteration.deepcopy(a)
    score = 0
    i = 0
    while i < nbiteration and score < vivants:
        c, score = iteration.avance(c, b, score)
        i += 1
    return (a, b, c, score, i)
示例#4
0
def principal(nbiteration,a,b):
    """
    Renvoie le nombre max d iteration et le score pour une table
    """
    c = deepcopy(a)
    score=0
    i=0
    while i<nbiteration and score<vivants:
        c,score=iteration.avance(c,b,score)
        i+=1
    return(i,score)