diff --git a/flappy.py b/flappy.py index d948a43..6c1acbb 100644 --- a/flappy.py +++ b/flappy.py @@ -21,8 +21,10 @@ class Flappy(GameBase): tmp = 20 self.click() cv.waitKey(int(100)) - if tmp % 5 == 1: - self.click() + 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: + self.click() cv.waitKey(int(wait_timer -100)) print("pet_pos: ", self.flappy_pos_disc.get_actual_pet_height()) '''