flappy init

This commit is contained in:
2023-07-27 21:16:19 +02:00
parent 33c7400fa4
commit c43399ac2a

View File

@@ -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: