From 4b20e617b45a1961de235bf118f65fc1bc48cd28 Mon Sep 17 00:00:00 2001 From: Arkadiusz Date: Wed, 5 Jun 2019 01:19:55 +0100 Subject: [PATCH] Koniec wygladu planszy --- .idea/workspace.xml | 99 +++++++++++++++----------- Images/waiter.png | Bin 3579 -> 3375 bytes Images/waiterBrudneTalerze.png | Bin 0 -> 3746 bytes Images/waiterJedzenie.png | Bin 0 -> 3792 bytes Images/zmywak.png | Bin 0 -> 4725 bytes __pycache__/waiter.cpython-37.pyc | Bin 8310 -> 9729 bytes __pycache__/wasteTable.cpython-37.pyc | Bin 0 -> 864 bytes game.py | 7 +- savedPaths.txt | 27 +++++++ waiter.py | 57 ++++++++++++--- wasteTable.py | 18 +++++ 11 files changed, 158 insertions(+), 50 deletions(-) create mode 100644 Images/waiterBrudneTalerze.png create mode 100644 Images/waiterJedzenie.png create mode 100644 Images/zmywak.png create mode 100644 __pycache__/wasteTable.cpython-37.pyc create mode 100644 wasteTable.py diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 4aefa92..3a76e51 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,12 +2,11 @@ + - + - - @@ -131,10 +140,11 @@ @@ -431,16 +441,6 @@ - - - - - - - - - - @@ -451,10 +451,20 @@ - + + + + - - + + + + + + + + + @@ -465,32 +475,39 @@ + + + + + + + - - + + + + + + + + + - - + + - - - - - - - \ No newline at end of file diff --git a/Images/waiter.png b/Images/waiter.png index 752e4589c9b88a81ca587ef2c0d026ef325de852..9420f41e3e29d9aec5224c74ea9b7c1c8003c97d 100644 GIT binary patch delta 3373 zcmV+|4bt-a8?PFWBYzC`NklENhCrd zCM2>jxHE zuADU0w5W;c*>xQ_$kUn;tA28je&+f_5i9#9iDp#w(S6gzWDAayt;*}^xg9;87^O9+ ztIthxkoaekO@EBImh`AE)kV>ap9RB?UXa>o7wvJbke=-88atx?laz@WdoG8^Qa!)x zvCbTAuG|PYfz5=f_kACp=jlc0nWRGRnGhV!7%gCqH+Pek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c$6%-@@5hXISMLy?#-7gzimEO`=|JpinFh3BzFv!o^QU&Y(j~!d#aV=9ZZ%EF7zP} z)ZL_Mls5kHP`NT(VLRuC~ z1?=K}5MqqhCQHwRZ$z##Hurx-}#&%vfok39trKnk- zm&I55J*Z~5)pH{1RA#^1nV=cjE;ycmMga{)P z_kYV18-^xV>K1xJOBqJ$7rEv)KVo_?!Zaa)HtAq=u@& z^XDRuy|T}>cRBim*Vi^!eJuor+WcfJ(6H8nUSep56m%sHd%_Wt@hak zvE_@QNFL5S5Y!L3x-VKhZi2xgt@E)tsEm{Mnr2#MsVow6&xjgxZ(Nzd$<{uEurl!e ze~mzPWT;cA+DM}qgM7hCd0=d8oRe^~*+R$|tDu#>c}t53MhSH5)-4QrZCyf^%yi@n z#u%^e&PBDeXb87YH17yWO-7(tZU&bX%EK2 zR9Q+*GgUIvh^a)X%H*NCJBd_r@}ru3BF-x&6Rjf1UpW{#e8#6IhkjLt)e~8)ATv^A zD&5b_0X)M@lV7UQ;f{zx!}|SHS)&stt4Ef-StSYY;dh9NK|Mq&_hKZ>uaCrULRbLa zRA4g}O3T3NmqU6Hq@HJRoz_X$g<+eiI$ZY_wuWF_IE{K^48$?;UutqPt!naig8%>k M07*qoM6N<$f=diE%>V!Z literal 0 HcmV?d00001 diff --git a/Images/waiterJedzenie.png b/Images/waiterJedzenie.png new file mode 100644 index 0000000000000000000000000000000000000000..6350aecdd20dbe805d214211c9de6537215874df GIT binary patch literal 3792 zcmV;>4lnVEP)b+<6EXFo=5@KTr2@oJ*NrH$1f(Q^o2t^2i#7iD{sPtErO_`Z)2p?JZ~Ko|xHf)K8oK^Q$pG(ivq;yK+0p&ZJyU^w() znMQIPy_Ms{SVU`x`v8_@bD!aG0K+iVD4vtnFfGfJlZFv3YGS%JO#=qfw8q4$pBxlj z^YcIvEBgjP#Hi{M^$i1^Ef_|;Dz6vKZA9aVQCfq#+Wblm6906vi4ij)J?cx(27@7A z3xcbWQs*wiYsbp(V4^X~Q&3WE|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p?6(Xff6B z#J>u|F>;WL|^voP04 z&g&xitProzZaQ8Cy}?jWiF(agYopPUoH>z14NLto%_@-_%d0D6k6Ddd)p31VZoL6Z zHfsc}T(}x+g{ii@+@*tRUC@iC6-t`Y<=w56$so;>$UiQ5iYOeE`^ePP)EJuylZqrH zeEqK(x)F^%PTQ7!Ky!d3Qgi5;Bz(Iew1{4;Gyo?pEt#%Mp zJmwM*MFqkzN0t{@URjl}7_TJE7;8gn8yMsX;$9bSn!%@px%pM9NOJ>$U&HFk8YbFR zpokDOeGK9VDVQd2$R0!VGL`d+PP)VEZ%C>xnyggB(mmw#>C?g;a)$lcjw&U;b&Tvs z)l%ckng!;wCOdU(w%0VY{`R2=rT@8T{!-DbC<^=!(zk9@?y>Z&00000NkvXXu0mjf DAUqb> literal 0 HcmV?d00001 diff --git a/__pycache__/waiter.cpython-37.pyc b/__pycache__/waiter.cpython-37.pyc index 456ce4faea7911a5aebce85516aa061a4cc15012..ad0ebdb9956d5c15d84e8df33c4e93d8610dfebd 100644 GIT binary patch delta 3615 zcma)9U2Ggz6`nhPJNx6G*s<5+b!@MbG#T62G(strDrzNW6W7i9Zxe?$WV7~6cE`J( z-QF43)EZcYMo7Rz9bG`JloT5YsX{>&R8*xrqz`=oRZ4^e4bMCI~ z^*V*_=zeqOoOACv_uO;Ox%=tFt>;_MwX{S8_{~NBb?w#ko!0M0B>0+u=H9=vz4naR zcUyR&-8^RY!~2LiU=G5&!%Uh(@a{B^n(B+ZR>@lN2TT zS9Vo?7>W48mgbXfLf9!~goN3GGBO;<>t$LrL^=oqg0|&ysbsr$*_l~dv6j69)BZ%6 z>;9xZElf>TM3eLgF#SJSSbaFWKfSlVfJtJMAAU=FhE^5 z9YI3lGQJ#IXkNw}p@*Z*dek)cXtOf$as@PfPy0NYey3gftd(ttyV?2huZ?D{hgT<0 zme(CnnTUKIl`lsAer*(;5}MA=PhGf}p=0b$9 zwT;Bs_|$4HZ@J^^Ioq@7bC$VbIkq)caq>GNh;0luNt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zMYT@tMQv8gXf2woDey>|#6BGuee!D{9z-jz7%Q6o7a3$GdhCH)&!Mht%GL8rY_#r~)J^5NQbcsT;>lo#xOAu_huu9xUD+UeBPOP^Zw>N zZ=QKL9-ZjviAXTM|L5Vw%FI^u(})bKahRUJb!YvBbCNa8LrX=+w`oa*Z5;TkzUn#qcERVo}5>=zsmjFlzO5Ml%Jo3a&WdHFNelE;b3jwt7Wo60az*llGil>${1 zJ)ymb0|>K?5tdVDqrbuWs}gx%H8 zb-JY+JEMW(P?i#u?a(eSHbAu;eunDl@Z8gUPe$VG=kQOdr}?i=x*K({@lE6zHvWn{ zxOfCyxc#MB*eaGb8%d`!B(2ijDzW=pa3YI1b2*%a#^s zI|)17XtTXx z1jEv}QnTxH0(V7?C-6%YR#)J`DR!-YbI8PP0bwp&s@kQsoa=d8+oJq@$ZiDOP6>rL^m#yfoPk7Q> zTBp>m`|}N(7BM@V9Zh_Yz>IZdhn|7GzuC8md*s&kzXN%tZvviKy{>pS;5U3-p*Ps? zhmNz$gR!Q_*%ZiM>6>)R#hQJ|^h%C>Wz9Zmc4Sb*N2k%=4B)Z&=qw&35tvYV8nGAN zAzWqvTwiX7XNhJ$g-3IUEMgw9_w+ejo@Kuz2Zx>%?0GnTi?F+i99vBN+H61gUWrve z0>&TjSO&!&6RjnhN;DG{1&M{rRo}T}bIq&Sc4N1nxY{WCRUR%o)GmplG*N{>P>L&V zt>$jzt9A|q$>;2A^ED-F^|Buir<OeOCVBy3?gv_=_@|E* z?hWCGY&>Te#sQ-jW*{{9)OYDbqEXhOe@+w3iZa=1$-A|kU0ehlW AVgLXD diff --git a/__pycache__/wasteTable.cpython-37.pyc b/__pycache__/wasteTable.cpython-37.pyc new file mode 100644 index 0000000000000000000000000000000000000000..51cb790a4aa2eabff796598b33955a2bd568cf52 GIT binary patch literal 864 zcmZuvQES^U5SC=wakHi!6#BG3;FlEkGALt&6*}?~%Gxmq2H{w0X3usqNg<2L+xkP2 z$NeQeZR{z(V6dm%*`(=U2lw6SB%SU)-P>NTOF(|o-|-Jh$S+*%g@ZEyH7@`pk+dLV z@{UL*y$2#aMZbAtCh0AS_zq5xQHr=12F?Jqxvj{UN`j{)dmv*^dXj_X(udoD>wZj( zRd>mxP$|BOg4P4Q0yP7GwYMe$kdvHB`id|j=-SIEMClrltr?(adG2ol$+j5tCEn^t zf>n-o&?2eN`WM48nJRNpm#by+xj(O_uDg6JAqpLzCZ%#gCWls)j(&A?<%0RDiTW8{ zcD$G+(s8?*tB5;pRB^96kY0xfKEQXPPr&@SzPgM*7^O|T0E}-|>8C`OH+q(<)SCEC z85`f$c9GUqB8HV!MK)DcnkVt0rv7~8LLss$vqB&>22&Fn&=VH204=T04m9@nXH#q$ z1#JM@@OcT2B^zKU2hMU2{)KKiFa?_Xd9dkNl82k4mc{nWJ=-!0a{x?wquoo$@LwjQ zu0Dc2$KOMD2Syy%xJF)FU{bAA<@lt?ti}P<&j2E-d+1|lEu4bqxYWt=Ie4ZS4SG)N z(_WXw0I|AJhN)kj9C{iEG{oX?Wa3BCqWy bm`(7%n%I*Pn;cD@;p_I*H^{WXWFh+twb#c} literal 0 HcmV?d00001 diff --git a/game.py b/game.py index 0b2446e..bc744dd 100644 --- a/game.py +++ b/game.py @@ -5,6 +5,7 @@ from gridElement import GridElement from pygame.math import Vector2 from orderTable import OrderTable from pool import Pool +from wasteTable import WasteTable from operator import attrgetter import copy @@ -52,8 +53,10 @@ class Game(object): self.waiterNumberInGrid.x = i self.waiterNumberInGrid.y = b elif (((((b > 0 and b < 6) and (i > 0 and i < 9)) and not((i == 1 or i == 8) and (b == 1 or b == 5))) \ - or (b > 6 and (i < 4 or i > 5)))) and not i == 4 and not (b == 3): + or (b > 6 and (i < 4 or i > 5)))) and not i == 4 and not (b == 3) and not (i==3 and b==9): self.row.append(Pool(i * 50, b * 50, self)) + elif i == 3 and b == 9: + self.row.append(WasteTable(i * 50, b * 50, self)) else: self.row.append(GridElement(i * 50, b * 50, self)) if i == self.x-1: @@ -113,6 +116,8 @@ class Game(object): return 'O' elif object.type == "pool": return 'P' + elif object.type == "wasteTable": + return 'Z' def showGrid(self, grid): diff --git a/savedPaths.txt b/savedPaths.txt index ca39a53..af9e5e7 100644 --- a/savedPaths.txt +++ b/savedPaths.txt @@ -40,3 +40,30 @@ ['Right', 'Right', 'Right', 'Down', 'Down', 'Down', 'Down', 'Down', 'Down', 'Right', 'Right', 'Right', 'Right'] ['Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Left', 'Left', 'Left'] ['Right', 'Right', 'Right', 'Down', 'Down', 'Down', 'Down', 'Down', 'Down', 'Right', 'Right', 'Right', 'Right'] +['Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Left', 'Left', 'Left', 'Left'] +['Right', 'Right', 'Right', 'Down', 'Down', 'Down', 'Down', 'Down', 'Down', 'Right', 'Right', 'Right', 'Right', 'Right'] +['Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Left', 'Left', 'Left', 'Left'] +['Right', 'Right', 'Right', 'Down', 'Down', 'Down', 'Down', 'Down', 'Down', 'Right', 'Right', 'Right', 'Right', 'Right'] +['Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Left', 'Left', 'Left', 'Left'] +['Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Left', 'Left', 'Left', 'Left'] +['Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Left', 'Left', 'Left', 'Left'] +['Right', 'Right', 'Right', 'Down', 'Down', 'Down', 'Down', 'Down', 'Down', 'Right', 'Right', 'Right', 'Right', 'Right'] +['Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Left', 'Left', 'Left', 'Left'] +['Right', 'Right', 'Right', 'Down', 'Down', 'Down', 'Down', 'Down', 'Down', 'Right', 'Right', 'Right', 'Right', 'Right'] +['Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Left', 'Left', 'Left', 'Left'] +['Right', 'Right', 'Right', 'Down', 'Down', 'Down', 'Down', 'Down', 'Down', 'Right', 'Right', 'Right', 'Right', 'Right'] +['Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Left', 'Left', 'Left', 'Left'] +['Right', 'Right', 'Right', 'Down', 'Down', 'Down', 'Down', 'Down', 'Down', 'Right', 'Right', 'Right', 'Right', 'Right'] +['Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Left', 'Left', 'Left', 'Left'] +['Right', 'Right', 'Right', 'Down', 'Down', 'Down', 'Down', 'Down', 'Down', 'Right', 'Right', 'Right', 'Right', 'Right'] +['Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Left', 'Left', 'Left', 'Left'] +['Right', 'Right', 'Right', 'Down', 'Down', 'Down', 'Down', 'Down', 'Down', 'Right', 'Right', 'Right', 'Right', 'Right'] +['Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Left', 'Left', 'Left', 'Left'] +['Right', 'Right', 'Right', 'Down', 'Down', 'Down', 'Down', 'Down', 'Down', 'Right', 'Right', 'Right', 'Right', 'Right'] +['Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Left', 'Left', 'Left', 'Left'] +['Right', 'Right', 'Right', 'Down', 'Down', 'Down', 'Down', 'Down', 'Down', 'Right', 'Right', 'Right', 'Right', 'Right'] +['Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Left', 'Left', 'Left', 'Left'] +['Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Left', 'Left', 'Left', 'Left'] +['Right', 'Right', 'Right', 'Down', 'Down', 'Down', 'Down', 'Down', 'Down', 'Right', 'Right', 'Right', 'Right', 'Right'] +['Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Up', 'Left', 'Left', 'Left', 'Left'] +['Right', 'Right', 'Right', 'Down', 'Down', 'Down', 'Down', 'Down', 'Down', 'Right', 'Right', 'Right', 'Right', 'Right'] diff --git a/waiter.py b/waiter.py index 5d68420..7c6a8f6 100644 --- a/waiter.py +++ b/waiter.py @@ -20,7 +20,7 @@ class Waiter(object): self.image.set_colorkey((255, 255, 255)) self.type = "waiter" self.lastStep = [] - + self.whatKeep = 0 self.dfsStack = [] self.dfsPaths = [] @@ -52,7 +52,7 @@ class Waiter(object): #print(self.positionX) self.lastStep.append("Left") else: - pass + self.work(collisionObject) def moveRight(self): if self.positionX != self.game.x-1: collisionObject = self.game.grid[self.positionY][self.positionX + 1] @@ -67,7 +67,7 @@ class Waiter(object): #print(self.positionX) self.lastStep.append("Right") else: - pass + self.work(collisionObject) def moveUp(self): if self.positionY != 0: @@ -82,7 +82,7 @@ class Waiter(object): self.positionY -= 1 self.lastStep.append("Up") else: - pass + self.work(collisionObject) def moveDown(self): if self.positionY != self.game.y-1: @@ -97,7 +97,7 @@ class Waiter(object): self.positionY += 1 self.lastStep.append("Down") else: - pass + self.work(collisionObject) # SPRAWDZA NACIŚNIĘTE KLAWISZE @@ -119,8 +119,12 @@ class Waiter(object): def draw(self): self.rect1 = pygame.Rect(self.x, self.y, 50, 50) pygame.draw.rect(self.game.screen, (0, 150, 255), self.rect1) - #print(self.lastStep) - self.game.screen.blit(self.image, (self.x, self.y)) + if self.whatKeep == 0: + self.game.screen.blit(self.image, (self.x, self.y)) + elif self.whatKeep == 1: + self.game.screen.blit(pygame.image.load("./Images/waiterJedzenie.png"), (self.x, self.y)) + elif self.whatKeep == 2: + self.game.screen.blit(pygame.image.load("./Images/waiterBrudneTalerze.png"), (self.x, self.y)) # SPRAWDZA CZY ELELEMNT, KTORY POBIERAMY NIE JEST SPOZA PLANSZY def isMoveInRange(self, move, position): @@ -322,24 +326,28 @@ class Waiter(object): if self.isMoveInRange("Up", position): if self.grid[positionY - 1][positionX].type == "table": if self.grid[positionY - 1][positionX].id == idTable: + currentOperation.append("Up") self.bfsPaths.append(currentOperation) print("Dodalem sciezke: ", currentOperation) return 0 if self.isMoveInRange("Down", position): if self.grid[positionY + 1][positionX].type == "table": if self.grid[positionY + 1][positionX].id == idTable: + currentOperation.append("Down") self.bfsPaths.append(currentOperation) print("Dodalem sciezke: ", currentOperation) return 0 if self.isMoveInRange("Left", position): if self.grid[positionY][positionX - 1].type == "table": if self.grid[positionY][positionX - 1].id == idTable: + currentOperation.append("Left") self.bfsPaths.append(currentOperation) print("Dodalem sciezke: ", currentOperation) return 0 if self.isMoveInRange("Right", position): if self.grid[positionY][positionX + 1].type == "table": if self.grid[positionY][positionX + 1].id == idTable: + currentOperation.append("Right") self.bfsPaths.append(currentOperation) print("Dodalem sciezke: ", currentOperation) return 0 @@ -404,4 +412,37 @@ class Waiter(object): if direction == "Down": self.moveDown() self.game.draw() - time.sleep(.50) \ No newline at end of file + time.sleep(.50) + + def takeDish(self, orderTable): + orderTable.hasDish = False + self.whatKeep = 1 + + def putDish(self, table): + self.whatKeep = 0 + table.hasDish = True + table.isWaiting = False + + def takePlate(self, table): + table.hasDish = False + table.isClean = True + self.whatKeep = 2 + + def putPlate(self): + self.whatKeep = 0 + + def takeOrder(self, table): + table.isOrdering = False + + def work(self, object: object) -> object: + if object.type == "wasteTable": + self.putPlate() + elif object.type == "orderTable": + self.takeDish(object) + elif object.type == "table": + if not object.isClean: + self.takePlate(object) + elif object.isOrdering: + self.takeOrder(object) + elif object.isWaiting and self.whatKeep == 1: + self.putDish(object) \ No newline at end of file diff --git a/wasteTable.py b/wasteTable.py new file mode 100644 index 0000000..27944ae --- /dev/null +++ b/wasteTable.py @@ -0,0 +1,18 @@ +import pygame + +class WasteTable(object): + def __init__(self, x, y, game): + self.game = game + game.idItem += 1 + + self.idItem = game.idItem + + self.x = x + self.y = y + self.image = pygame.image.load("./Images/zmywak.png") + self.type = "wasteTable" + + + def draw(self): + self.rect = pygame.Rect(self.x, self.y, 50, 50) + self.game.screen.blit(pygame.image.load("./Images/zmywak.png"), (self.x, self.y)) \ No newline at end of file