diff --git a/.gitignore b/.gitignore index 9bdfd81..e645451 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ .idea bin venv -.venv \ No newline at end of file +.venv +__pycache__ \ No newline at end of file diff --git a/main.py b/main.py index eacf9b9..278ec82 100644 --- a/main.py +++ b/main.py @@ -1,9 +1,8 @@ -import sys import secrets +import sys -from src.graphics import * -from src.waiter import * from src.decisionTree import * +from src.plateRecognition import * if __name__ == "__main__": # SETUP @@ -33,21 +32,36 @@ if __name__ == "__main__": pygame.quit() sys.exit() break - + if event.key == pygame.K_s: - tree.TasksList('check', [10,3]) - tree.TasksList('eat', [5,12]) - tree.TasksList('order', [12,4]) - tree.TasksList('goToBar', [10,10]) - tree.TasksList('check', [3,4]) - tree.TasksList('eat', [10,5]) + tree.TasksList('check', [10, 3]) + tree.TasksList('eat', [5, 12]) + tree.TasksList('order', [12, 4]) + tree.TasksList('goToBar', [10, 10]) + tree.TasksList('check', [3, 4]) + tree.TasksList('eat', [10, 5]) 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: temp = False while not temp: x = secrets.randbelow(graphics.width) y = secrets.randbelow(graphics.height) + print(x, y) if waiter.matrix.matrix[x][y].walk_through == 1: temp = True diff --git a/src/__pycache__/graphics.cpython-37.pyc b/src/__pycache__/graphics.cpython-37.pyc index 29f67d1..93ffeee 100644 Binary files a/src/__pycache__/graphics.cpython-37.pyc and b/src/__pycache__/graphics.cpython-37.pyc differ diff --git a/src/__pycache__/matrix.cpython-37.pyc b/src/__pycache__/matrix.cpython-37.pyc index 1f46182..f364294 100644 Binary files a/src/__pycache__/matrix.cpython-37.pyc and b/src/__pycache__/matrix.cpython-37.pyc differ diff --git a/src/__pycache__/tile.cpython-37.pyc b/src/__pycache__/tile.cpython-37.pyc index 54bba7a..524635e 100644 Binary files a/src/__pycache__/tile.cpython-37.pyc and b/src/__pycache__/tile.cpython-37.pyc differ diff --git a/src/__pycache__/waiter.cpython-37.pyc b/src/__pycache__/waiter.cpython-37.pyc index 83a4f5f..2a763a6 100644 Binary files a/src/__pycache__/waiter.cpython-37.pyc and b/src/__pycache__/waiter.cpython-37.pyc differ diff --git a/src/plateRecognition.py b/src/plateRecognition.py new file mode 100644 index 0000000..e69de29