from Field_Representation import Field from time import time import cv2 as cv import keyboard from farm_overlay import FarmOverlay def run(): field = Field() overlay = FarmOverlay() while True: if overlay.run_mode == 'stopped': overlay.update_status_label("stopped", "0") overlay.run_mode = 'init' continue elif overlay.run_mode == 'started': cv.waitKey(500) elif overlay.run_mode == 'init': continue else: # boelk pass while True: if overlay.run_mode == 'stopped': break cords = field.assess_playfield_and_make_move() print(cords) cv.waitKey(1000) if __name__ == "__main__": run()