added r when flower not found

This commit is contained in:
lars 2025-08-12 23:16:58 +02:00
parent 68660f7f73
commit 22cb2f41b6

View File

@ -357,7 +357,10 @@ class FlowerGameEnv(gym.Env):
self.prev_dist_to_flower_nd = None self.prev_dist_to_flower_nd = None
# Eat-Event (Wenn die Blume woanders neu spawnt) # Eat-Event (Wenn die Blume woanders neu spawnt)
if self._cooldown == 0 and tf and ff: if self._cooldown == 0 and tf:
if not ff:
pyautogui.press("r")
else:
if self.prev_flower_x is None: if self.prev_flower_x is None:
self.prev_flower_x = fx self.prev_flower_x = fx
if self.prev_flower_y is None: if self.prev_flower_y is None: