def click(row, col): left, top, _, _ = get_client_rect() x = col * SIZE + X0 + SIZE // 2 + left y = row * SIZE + Y0 + SIZE // 2 + top if not auto.win_active(WIN_TITLE): auto.win_activate(WIN_TITLE) auto.mouse_move(x, y, 1) auto.send(u"{SPACE}")
def restart(): if not auto.win_active(WIN_TITLE): auto.win_activate(WIN_TITLE) auto.send(u"{F2}") time.sleep(0.1) auto.send(u"n")