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