added crop game first shot

This commit is contained in:
2022-10-13 16:31:09 +02:00
parent 4c2e5ae77b
commit c36e7a931e
9 changed files with 762 additions and 0 deletions

35
crop/main_crop_ui.py Normal file
View File

@@ -0,0 +1,35 @@
from Field_Representation_crop import Field
from time import time
import cv2 as cv
import keyboard
from crop_overlay import CropOverlay
def run():
field = Field()
overlay = CropOverlay()
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()