From c7dd04590a18861e06837d277f6a3df46f6ac218 Mon Sep 17 00:00:00 2001 From: Thaloria Date: Fri, 28 Jul 2023 15:31:16 +0200 Subject: [PATCH] flappy init --- flappy.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/flappy.py b/flappy.py index 5a2314b..3e0c502 100644 --- a/flappy.py +++ b/flappy.py @@ -25,5 +25,12 @@ class Flappy(GameBase): cv.waitKey(int(wait_timer)) if self.flappy_pos_disc.next_gate_height[0] is not 0: offset = (self.flappy_pos_disc.next_gate_height[0] + 120) - self.flappy_pos_disc.current_pet_height + if offset > 50: + offset = 50 + elif offset < -50: + offset = -50 print(offset) - wait_timer = wait_timer - (offset / 2) \ No newline at end of file + wait_timer = 380 + offset + print(wait_timer) + print("pet_pos: ", self.flappy_pos_disc.current_pet_height) + print("next gate: ", self.flappy_pos_disc.next_gate_height[0] + 120) \ No newline at end of file