From c495e58b7d5eaf1b687303cd42695d8b457f34c6 Mon Sep 17 00:00:00 2001 From: KikooDX Date: Mon, 13 Apr 2020 19:11:33 +0200 Subject: [PATCH] (sprito.py) New wait_until_ac function --- sprito.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sprito.py b/sprito.py index 34c1d1a..baf96ff 100644 --- a/sprito.py +++ b/sprito.py @@ -58,6 +58,14 @@ def invert_rect(x: int, y: int, w: int, h: int) -> None: for j in range(y, y + h): invert_pixel(i, j) +def wait_until_ac() -> int: + c = 0 + try: + while 1: + c += 1 + except: + return c + #color constants C_BLACK = (0,0,0) C_WHITE = (255,255,255)