diff --git a/crop/Field_Representation_crop.py b/crop/Field_Representation_crop.py index fe4dd1e..1e46cde 100644 --- a/crop/Field_Representation_crop.py +++ b/crop/Field_Representation_crop.py @@ -181,14 +181,13 @@ class Field: if self.check_for_button_and_execute(screenshot, self.reset_confirm): cv.waitKey(500) - self.set_color_order((PURPLE, BLUE, RED, YELLOW, GREEN)) - self.reset_counter = 0 - self.colors_at_standard = False - return - else: - if not self.colors_at_standard: + if self.colors_at_standard: + self.set_color_order((PURPLE, BLUE, RED, YELLOW, GREEN)) + self.colors_at_standard = False + else: self.set_color_order((GREEN, YELLOW, RED, BLUE, PURPLE)) self.colors_at_standard = True + self.reset_counter = 0 cv.waitKey(500) self.find_patterns_and_valid_moves(new_observation)