prepared environment for the subproject
This commit is contained in:
parent
51fa7c527d
commit
626c471e3e
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@
|
|||||||
bin
|
bin
|
||||||
venv
|
venv
|
||||||
.venv
|
.venv
|
||||||
|
__pycache__
|
32
main.py
32
main.py
@ -1,9 +1,8 @@
|
|||||||
import sys
|
|
||||||
import secrets
|
import secrets
|
||||||
|
import sys
|
||||||
|
|
||||||
from src.graphics import *
|
|
||||||
from src.waiter import *
|
|
||||||
from src.decisionTree import *
|
from src.decisionTree import *
|
||||||
|
from src.plateRecognition import *
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# SETUP
|
# SETUP
|
||||||
@ -35,19 +34,34 @@ if __name__ == "__main__":
|
|||||||
break
|
break
|
||||||
|
|
||||||
if event.key == pygame.K_s:
|
if event.key == pygame.K_s:
|
||||||
tree.TasksList('check', [10,3])
|
tree.TasksList('check', [10, 3])
|
||||||
tree.TasksList('eat', [5,12])
|
tree.TasksList('eat', [5, 12])
|
||||||
tree.TasksList('order', [12,4])
|
tree.TasksList('order', [12, 4])
|
||||||
tree.TasksList('goToBar', [10,10])
|
tree.TasksList('goToBar', [10, 10])
|
||||||
tree.TasksList('check', [3,4])
|
tree.TasksList('check', [3, 4])
|
||||||
tree.TasksList('eat', [10,5])
|
tree.TasksList('eat', [10, 5])
|
||||||
tree.print()
|
tree.print()
|
||||||
|
|
||||||
|
if event.key == pygame.K_m:
|
||||||
|
tabPos = [[1, 2], [1, 4], [1, 5], [1, 7], [1, 8], [1, 10], [5, 4], [5, 8]]
|
||||||
|
print(tabPos[0][0], tabPos[0][1])
|
||||||
|
|
||||||
|
if not [waiter.X, waiter.Y] in tabPos:
|
||||||
|
x = tabPos[0][0]
|
||||||
|
y = tabPos[0][1]
|
||||||
|
|
||||||
|
goal = (x, y)
|
||||||
|
path = waiter.findPath(goal)
|
||||||
|
path = waiter.translatePath(path)
|
||||||
|
else:
|
||||||
|
print('hello')
|
||||||
|
|
||||||
if event.key == pygame.K_r:
|
if event.key == pygame.K_r:
|
||||||
temp = False
|
temp = False
|
||||||
while not temp:
|
while not temp:
|
||||||
x = secrets.randbelow(graphics.width)
|
x = secrets.randbelow(graphics.width)
|
||||||
y = secrets.randbelow(graphics.height)
|
y = secrets.randbelow(graphics.height)
|
||||||
|
print(x, y)
|
||||||
|
|
||||||
if waiter.matrix.matrix[x][y].walk_through == 1:
|
if waiter.matrix.matrix[x][y].walk_through == 1:
|
||||||
temp = True
|
temp = True
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0
src/plateRecognition.py
Normal file
0
src/plateRecognition.py
Normal file
Loading…
Reference in New Issue
Block a user