예제 #1
0
def hit_ball(ball, white_ball):
    bx, by = ball
    wx, wy = white_ball

    move_x = 100 if bx < wx else -100
    move_y = 100 if by < wy else -100
    target_stick_at(bx+move_x/10, by+move_y/10)

    print("move stick to, ", wx + move_x, wy + move_y)
    mouse_controls.set_mouse_position(bx + move_x, by + move_y)
    wait()
    mouse_controls.left_mouse_up()
예제 #2
0
def shot_from_right():
    target_stick_at(TABLE_X_CENTER, TABLE_Y_CENTER)
    mouse_controls.set_mouse_position(TABLE_X_CENTER + 200, TABLE_Y_CENTER)
    mouse_controls.left_mouse_up()