From c43399ac2af8ffdf33f9fb7a239a19dba9b09dd4 Mon Sep 17 00:00:00 2001 From: Thaloria Date: Thu, 27 Jul 2023 21:16:19 +0200 Subject: [PATCH] flappy init --- flappy.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/flappy.py b/flappy.py index 8cf9df2..10bf000 100644 --- a/flappy.py +++ b/flappy.py @@ -34,13 +34,28 @@ class Flappy(GameBase): def assess_playfield_and_make_move(self): #last_letter_received = time() + wait_timer = 380 while True: if self.overlay.run_mode == 'stopped' or self.overlay.run_mode == 'paused': return pydirectinput.mouseDown() cv.waitKey(50) pydirectinput.mouseUp() - cv.waitKey(250) + cv.waitKey(wait_timer) + + offset = (self.flappy_pos_disc.next_gate_height + 170) - self.flappy_pos_disc.current_pet_height + if offset < -100: + #pet go down + wait_timer = 430 + elif 0 > offset > -100: + wait_timer = 405 + elif 0 < offset < 50: + wait_timer = 355 + elif offset > 50: + wait_timer = 330 + + + ''' if self.stone_id_thread.get_pick_up_status() == False: if (time() - last_letter_received) >= 5: