From f5580a6eda33cfb85ff98ffc8879d034592810e8 Mon Sep 17 00:00:00 2001 From: pascald Date: Sat, 3 May 2025 02:14:00 +0200 Subject: [PATCH] final changes for better touch function --- main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 665dc46..b8a2e0c 100644 --- a/main.py +++ b/main.py @@ -80,7 +80,7 @@ async def touch(event): touch_start = (event.x * SCREEN_WIDTH, event.y * SCREEN_HEIGHT) touch_start_time = time.time() print("touch_start") - return False + return "False" elif event.type == pygame.FINGERUP and touch_start: end = (event.x * SCREEN_WIDTH, event.y * SCREEN_HEIGHT) @@ -101,8 +101,8 @@ async def touch(event): return "ontop" else: print("touch problem") - return False - return False + return "False" + return "False" async def is_SPACE_event(event): @@ -651,7 +651,7 @@ async def show_game_over(score): if event.type == pygame.QUIT: pygame.quit() sys.exit() - elif await is_SPACE_event(event) or await (touch(event) == "snap"): + elif await is_SPACE_event(event) or (await touch(event) == "snap"): if ready_to_submit and prepared_form: print("Benutzer bestÃĪtigt, Punkte werden jetzt gesendet.") prepared_form.submit()