From 626c471e3edd3449b2ea1365c28ff168f6829649 Mon Sep 17 00:00:00 2001 From: s450026 Date: Fri, 22 May 2020 00:32:20 +0200 Subject: [PATCH] prepared environment for the subproject --- .gitignore | 3 ++- main.py | 34 +++++++++++++++++------- src/__pycache__/graphics.cpython-37.pyc | Bin 2047 -> 2065 bytes src/__pycache__/matrix.cpython-37.pyc | Bin 1939 -> 2087 bytes src/__pycache__/tile.cpython-37.pyc | Bin 910 -> 925 bytes src/__pycache__/waiter.cpython-37.pyc | Bin 4385 -> 4516 bytes src/plateRecognition.py | 0 7 files changed, 26 insertions(+), 11 deletions(-) create mode 100644 src/plateRecognition.py 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 29f67d115bbf74f39bd3bd4cc0aa40853948b20b..93ffeeea6d45840e1754064b426d4efd70ec2d29 100644 GIT binary patch delta 540 zcmZ9IO-lkn7{_P!&CyujE37E$5bPnMu0^01Z(V{Yp=5H$MO$+jSJaS>-fiieo%#UL z$$Rt}<`WcshNyWKlXRE)?J)Cye$UMQB!)?|V45)`pO5>u%fZlm#_z+|$2~jQM`goD z^~i|yQC*Y6$fC(i&!VdGgk>UXqZ4GMj&C=D5ng(Ez*yN;r0jDakO0Ibte7yoox-?U=jprw6XfRTfnrzC`S<<@)- zci^T(i8#zJ`#q0Y8c##OXi%Tmx&rqE?(z%-Lu6qyZgbix(8{&Lo9!EWJs9hE2jJz) zfT`9}Lm6Lz)f`|>q*q)*+-}{B})_7Lg#BLld{o*DhhmVq3so!;r-c#H=C=P!@{_LmJaU z#u|orjueJq22BCKD*4G5n8Y^EW@Ka%FajF$k{?9y0SQgc$s3u)CZAz;U=*Cp%Mzxb z0u*Fm;sQZNBnS~<5@MR%%JMpv2dJiq7es&zy2X-|lUY*43F31Di71Zr)ROp;%7Ro) zmLdU=0=C@5lA_FtTa1;r7%PedK?=cy5J-|Qr6{r7DKR-ay(qslFGX?kS=Kshkhw*o zAOdczCNtQuA_ hu&5?e5l9ToMzRX7^%jQ>&>5vUsdkJY{UC!lm;uJkVBY`$ diff --git a/src/__pycache__/matrix.cpython-37.pyc b/src/__pycache__/matrix.cpython-37.pyc index 1f46182f46d5601b7123105762b8aa7bcb304ec4..f3642940ea589879751b0a32cb38c198fb9108c3 100644 GIT binary patch delta 167 zcmbQtzg&RViI$lpMG})anSvM-S#Gfur{<(Zv6fU8 zq{iQ3thmKkxsstsY_b?r5To4WOeV$2Jxo5z!ay@_vF4X#q!ty40of2j93;vXAD>zn zA1^)mHW$BN+_V2R5C_qBJU(dmx&8(c~baV7@{~+_=6cV1vWlB%E5k%r69E^ z_txgMoRKVyw>Go$y=AOVW&~*j0wySS2GYd>K%#~r3xpZdnQ9qp7=eZ``e`y1@d9Ov z_<#hEEev9tf(Q{fAqr&OV)4sQN&N<76|(>d21XvnD(>*a%#ze1J&=r_Cf6;F`1riU z+|-0fNF}&K!hcTu$ufV0GANR9u7thE)F&hc@9601P+18=>lGizb9`J I$YU%40EEFeQUCw| delta 112 zcmZ3YyikePiIjAMs4288Og#J zwV9vqEhDp^Cg