Ejemplo n.º 1
0
def startGame(string):

    global tableau
    global canvas
    global idTimer

    document["zone"].text = ""

    tableau = initPlateau()
    
    if len(string) != 0:
        tableau = convertStringToTab(string)

    canvas = CANVAS(width = tailleTableau*64 + tailleTableau*5, height = tailleTableau*64 + tailleTableau*5)
    canvas.bind("click", cellClickEvent)

    document["zone"] <= canvas
    idTimer = timer.set_interval(gameLoop, 16)