diff --git a/crop/Field_Representation_crop.py b/crop/Field_Representation_crop.py index 1e46cde..0fdf4ee 100644 --- a/crop/Field_Representation_crop.py +++ b/crop/Field_Representation_crop.py @@ -172,6 +172,7 @@ class Field: # last board state is same as actual if mse(new_observation, self.observation) == 0.0: # no movement detected -> blow explosives or reset + self.reset_counter += 1 if self.reset_counter >= 3: screenshot = self.capture_window.get_screenshot() @@ -188,7 +189,9 @@ class Field: self.set_color_order((GREEN, YELLOW, RED, BLUE, PURPLE)) self.colors_at_standard = True self.reset_counter = 0 - cv.waitKey(500) + return + self.detonate_explosive_when_stuck(new_observation) + return self.find_patterns_and_valid_moves(new_observation) self.observation = new_observation