diff --git a/fruit.py b/fruit.py index 20f9d84..9fd0ecb 100644 --- a/fruit.py +++ b/fruit.py @@ -71,11 +71,12 @@ class Fruit(GameBase): def get_current_board_state(self): # get an updated image of the game screenshot = self.capture_window.get_screenshot() + screenshot = screenshot[900:1100, 1100:1450] # screenshot = cv.imread("field_farm.jpg") # gray = cv.cvtColor(screenshot, cv.COLOR_BGR2GRAY) # thresh = cv.threshold(gray, 0, 255, cv.THRESH_BINARY_INV + cv.THRESH_OTSU)[1] - if self.check_for_button_and_execute(screenshot, self.ok_button, 540, 180): + if self.check_for_button_and_execute(screenshot, self.ok_button, 900, 1100): cv.waitKey(500) screenshot = self.capture_window.get_screenshot()