added color switch and reset trigger

This commit is contained in:
2022-10-14 16:50:09 +02:00
parent a77f66cb77
commit d9a304523e

View File

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