|
|
@@ -79,14 +79,19 @@ def non_max_suppression(boxes, overlapThresh):
|
|
|
return boxes[pick].astype("int")
|
|
|
|
|
|
|
|
|
+def sleep(t=1):
|
|
|
+ print(f"sleep {t}s")
|
|
|
+ time.sleep(t)
|
|
|
+
|
|
|
+
|
|
|
def tap(location):
|
|
|
tap_helper(location)
|
|
|
- time.sleep(1)
|
|
|
+ sleep(1)
|
|
|
|
|
|
|
|
|
def swipe(start, end, duration=1000):
|
|
|
swipe_helper(start, end, duration)
|
|
|
- time.sleep(0.5)
|
|
|
+ sleep(0.5)
|
|
|
|
|
|
|
|
|
def tap_button(template):
|
|
|
@@ -118,7 +123,7 @@ def find_max_y_pair(coordinates):
|
|
|
|
|
|
def snap():
|
|
|
save_screenshot(screenshot_address)
|
|
|
- time.sleep(0.5)
|
|
|
+ sleep(0.5)
|
|
|
|
|
|
|
|
|
def take_fight_screenshots():
|
|
|
@@ -129,7 +134,6 @@ def take_fight_screenshots():
|
|
|
# snap()
|
|
|
|
|
|
tap_button(close_fight)
|
|
|
- time.sleep(1)
|
|
|
|
|
|
|
|
|
def find_templates(template):
|