added color rnd

This commit is contained in:
2022-10-15 19:21:59 +02:00
parent b6315f7b0e
commit 619d629321

View File

@@ -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]