Пример #1
0
    try:
        print(" best score : %s" %score.get_best_score())
    except:
        print(" best score : 0")

    while table.can_move():
        print("\n Pick a move(wsad)")
        usrInput = getch.getch()
        if usrInput in ('q','Q'):
            break
        if table.check_user_input(usrInput) is not True:
            continue

        table.make_move(usrInput)

        if table.is_goal():
            break

        if table.free_list != [] and table.flag == 1:
            table.pick_grid()

        if flag == 0:
            table.pick_grid()

        flag = 1
        table.flag = 0

        os.system('clear')

        print("===========================================================")
        print(title)