Files
Litcraft_Python_B/farm/main_farm_ui.py

37 lines
820 B
Python

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(1000)
elif overlay.run_mode == 'init':
cv.waitKey(1)
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()