update flappy

This commit is contained in:
2023-07-30 15:08:29 +02:00
parent c1eecfd567
commit 804f178fbf

View File

@@ -21,8 +21,10 @@ class Flappy(GameBase):
tmp = 20 tmp = 20
self.click() self.click()
cv.waitKey(int(100)) cv.waitKey(int(100))
if tmp % 5 == 1: if self.flappy_pos_disc.next_gate_height[0] is not 0:
self.click() 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)) cv.waitKey(int(wait_timer -100))
print("pet_pos: ", self.flappy_pos_disc.get_actual_pet_height()) print("pet_pos: ", self.flappy_pos_disc.get_actual_pet_height())
''' '''