added sleep time after game restart

This commit is contained in:
lars 2025-08-11 00:19:29 +02:00
parent 443840b2ca
commit 8669b07ceb

View File

@ -186,6 +186,7 @@ class FlowerGameEnv(gym.Env):
found_blue = np.any(np.all(np.abs(rgb_data - target_color) <= tolerance, axis=-1)) found_blue = np.any(np.all(np.abs(rgb_data - target_color) <= tolerance, axis=-1))
if found_blue: if found_blue:
pyautogui.hotkey("ctrl", "p") pyautogui.hotkey("ctrl", "p")
time.sleep(0.5)
return cv2.cvtColor(raw, cv2.COLOR_BGRA2BGR) return cv2.cvtColor(raw, cv2.COLOR_BGRA2BGR)
def _detect_entities(self, frame_bgr): def _detect_entities(self, frame_bgr):