diff --git a/crop/Field_Representation_crop.py b/crop/Field_Representation_crop.py index f43307d..7c41769 100644 --- a/crop/Field_Representation_crop.py +++ b/crop/Field_Representation_crop.py @@ -140,12 +140,10 @@ class Field: if self.check_for_button_and_execute(screenshot, self.reset_confirm): cv.waitKey(500) - 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 + color_list = (PURPLE, BLUE, RED, YELLOW, GREEN) + random.shuffle(color_list) + self.set_color_order(color_list) + self.reset_counter = 0 return else: @@ -199,6 +197,7 @@ class Field: offset_left = 230 offset_down = 58 if self.check_for_button_and_execute(screenshot, self.next_level, offset_left, offset_down): + self.set_color_order((GREEN, YELLOW, RED, BLUE, PURPLE)) cv.waitKey(500) screenshot = self.capture_window.get_screenshot() screenshot = screenshot[58:1134, 230:2113]