added crop game first shot
This commit is contained in:
35
crop/main_crop_ui.py
Normal file
35
crop/main_crop_ui.py
Normal 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()
|
||||
Reference in New Issue
Block a user