From 825aaf90515e30f87acb6ee5f3acfbb2fc067238 Mon Sep 17 00:00:00 2001 From: s473561 Date: Sat, 6 May 2023 18:06:30 +0200 Subject: [PATCH] grid.py, wozek wymija regaly i miejsce --- __pycache__/ekran.cpython-311.pyc | Bin 0 -> 4663 bytes __pycache__/etykieta.cpython-311.pyc | Bin 1302 -> 1296 bytes __pycache__/grid.cpython-311.pyc | Bin 0 -> 2026 bytes __pycache__/packageList.cpython-311.pyc | Bin 0 -> 1354 bytes __pycache__/paczka.cpython-311.pyc | Bin 2703 -> 3450 bytes __pycache__/regal.cpython-311.pyc | Bin 3257 -> 3260 bytes __pycache__/wozek.cpython-311.pyc | Bin 3444 -> 6076 bytes __pycache__/wyszukiwanie.cpython-311.pyc | Bin 4363 -> 4172 bytes ekran.py | 4 +++- grid.py | 25 +++++++++++++++++++++++ main.py | 5 +++-- wyszukiwanie.py | 22 ++++++++------------ 12 files changed, 39 insertions(+), 17 deletions(-) create mode 100644 __pycache__/ekran.cpython-311.pyc create mode 100644 __pycache__/grid.cpython-311.pyc create mode 100644 __pycache__/packageList.cpython-311.pyc create mode 100644 grid.py diff --git a/__pycache__/ekran.cpython-311.pyc b/__pycache__/ekran.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bcff85184f1b2289e220b22331b4f0bb5c7f9a10 GIT binary patch literal 4663 zcmc&%-A^0Y6~8lcZDV6&Fa*L^0-Lrg0}Zf&Hp*5}*+5hlL|Vv)V$pRco(Ub>*yN6B z78iHj6;;s+sjk#0ysYGhUCJs_mA|1+ee|G_utq|PRBa`{RF?9#Pd(?_GZ<(kt6Qnp z<8#lP`#a~}xpU6BXZ{=r_z1LE_M!4g3n72U8@tgu^Y*U-AuowS6d_3>wO)t_{9cTR zyq6*p^kP!DkKGfhaWMhQCK8aj;%%MX${@_NrU;JQWXMrdRNQxn%WQfpzcvIlC+1tc4q zPi54kwx*^ssjZ>sX~1NIbyY2vPN6~!XR(_b7_d*?{sZ>eo3-r%w7Y5B9*%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U+Fbdm4w}qG}z$v>8RR(J0guM{HldtF!<7wau!gwwa z*%0#Y00~PBW6|=ZSQK`R=~>wlG#yvx1aOzW0Xaa)MiZGd+p5FZ`vAEOfBk1bAdEXg z`42II-+S?!L(%9NIsCu~jGKXRjNtEZvMZEZ{kzXTo8Fx+cMg{P^{ag8YH|3FAMN^f zeN~T*{XcISy9o~!uJ6+@@)8?`j_*?d6J}uIf3;O^n2Y<@uYh@p5f6Q>DMEthA~xFSV{tA+1RR1xIbmBUqW*;j zwXu|Oz6Qy;0~8LVtLSk&6V$y<`wPZ?0b}1~iOH1ZPilHbu75^Z6z?ogy`tjD0d{>F zCbrx>1IRiqt$viS_kibQ2^f7I2soa{zw>cn^3z;Cchdci+5K*n2;T2=vU|7e5B*{3 zv!(qTMd{0jhJVcTkCpgUb&-}!`CL`BvE1Rp{k1gH3Uepmvu_br$9iy5ToRi_LXn_L z@c3bvTdWpc%|zGJidsu=F8<*M50{n|Hi-al1`c2SX_~EDEp~%DyvcEdn3{H#nCQp_;xA8dS9#-3(UL3{Zh#$V+wEPH`wV70J zvwI+e*Ff|YpjAl_gfa=_`R@%0mF%lb{CWOsV0ufWewA&;k-Q0A$_L9GUHP`MH@J7@ z*gJIO9V(8$zFivr!0_HNy?65Nvafw_?AX_T<%~BbA7l}ke2K*c0G-1gcK`qY delta 160 zcmbQhHI0jRIWI340}y=ec1)Qyk#_ozcOfF*9U}T*< Un|TQ%%VYfUfcd$eN0AVH`&;S4c diff --git a/__pycache__/grid.cpython-311.pyc b/__pycache__/grid.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2c1301437996be7e15809a509b3f1f77c3b7cc05 GIT binary patch literal 2026 zcmah~&rcgi6rS0gU2J21H6aSr4UnKpR#Ie8+CvppLfDN^kyT-6(~YaGYg&B+zg*+yf`ixkN z(qWJ7BLiy8mgrj%u)@_V&GBp;*UkiTHxjK%FY%SIAaHmJ1Aw7x)(7`yHMe# z>BUU5vT0SzD9256yILp*Bka@VOvYo&^9!GO+UHC23z=WZ1=y1}Ull*juR2^f`E+J! zDWBdfRx8|goqTR(HN7~We`q?q!W~!SbGvS}xN8^8Mcd`&(mJ<`8-;wgfKEwy=8T^TnP`@Wp3|MRzS%Aw#t&$QkRL;1@ zb*`@|V^Rr$_x1E57JUS)rCaP7GotX-;2X14NN%4O%khFJev2vg7zXa?g1c2=XN%zu zp-;>;R>8##z#*xT7x2B_j(~dErLnSL5}Jj2h?yn38ri_PWUJAdvZi3h_s8}hSSt8_HxHV7>K^N{4)+z3dBs|- zvA{ZEv97JQr}x-~hq>2Qt3e&enG-VcTGl@;n7-t2QV~%QBm{B?qXrpEGvuX=kW@N& zn}qxwlmov13O{klOVv&Uh|oVy82X>QB2W3U^cnC{4tVJ^;H4~i1`*-5c5wCJ^)7rQ z056Z)J)fWM^17#qg1yfDlQ@9pw`N<*&z~MVJtuSkXn-a? zn@*iff7oOPQ5Y?>-aj6mY7bAHtEj=~=rTp~SqVR+8}p6rzb5XVOr#p={l(^XYoy7K z{6COSL<%hN(r|tPfW%RHN=Dng&mZJY`)$uTQ|aJ2xem>TuaJFx UITRnHu%hem3c1&B8IY^|2lS+zssI20 literal 0 HcmV?d00001 diff --git a/__pycache__/packageList.cpython-311.pyc b/__pycache__/packageList.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6e569dac6068e9dcc81dc4a6c1ff0db42ef66dfc GIT binary patch literal 1354 zcmb7DJ!soN6uy&WMTz4Yl*ILtR0JCElBI=~PznV%#UvyJHz@>xBBV?3pX^FbJ7wy-lkMhbD1Fksd+*)7d+$Dd`V@(bA&|}W zb@LTQ=qGgsBJ_>k92j-Pp(n^hyU4^14xwWhfovd?+eI7LMz3I%@jaS~B%Wy{kE-KpfXr)1F&4JWJP7mP_)PZDJW&T^%~ERneXoJ(5#P!M&ED z_I#=0^SWtz^5rYfLyV&CP`qlWBaQEkewX6kr1-&POPXm*GtI%2OK`Rblh2omr3AJmupL@Su_;-6(I$oBOX5vkX+8*#(A`s@ z`u%^1ypOz#?nU3S#~z23m4xU^nr7(*qG|q^rWJ~2IZy3zO?y$+^T7&h!VW`%9R+oS zSTgIurWa+3_T}6IRU1B?aHN*(3OIDDi-tGh3mA3ayvgNJ z0q+2%T?$cOEhr1ka*=_yTeLunFH@3z8fP zkfQWi5%ctnl`*pAtVVf3*d~&*r(qLC(^&@voDim)m){?<(voM}@@#FXBggmW4q}J$ z$MomhCle>e*E^^DX}Tq++Hwk(h3K2r*Q@(WEkS7uN>fle;aF3M^-0AAte^$$392a9 t7+ub#2LZ(%+Vsz2oLK~;%VUhY+z19%Tvxwn?DyY=$q>HTMb{Op^9Sez7jOUo literal 0 HcmV?d00001 diff --git a/__pycache__/paczka.cpython-311.pyc b/__pycache__/paczka.cpython-311.pyc index 43bec40fc68fd01dccf72a6e47e1d8089d3379d1..e68be215881fb5ad29fddbe88eaa1c5a53955fd0 100644 GIT binary patch delta 1264 zcma)5O=uHA6rM?TH@itUwQXveAKTc!kTz5*L@kKzLFmEOAB0}xn%RbJlTDaS(S~5f zQw{~IbI_xwN-2oYi?AU!#6(@k3x>A-&Peeb>bX7|0>r`-q9 z;A>U&Bfjp<&5>>SS@3=6lLw&}sD^7O3khejDIq;Y@H$3llRwSH3wY_FkBMi|VRWL> ziXyZixD~HN_Qe~{w{pb0&i&06Kdwdu&LnrI!+b6?w`-V)r#TCISXqeOXq`ZOCsctQ zsXpSW@+nmhgxKVfs{e#4up`yU|Mh~uA6HsAl@bYXUAG0O=HX0sY0b--(qhm%XQU7z zZJY(%98o!Ib6F(@9$UlbSAuSgpt~p)yjkrqidtT`E|j%gbx|8Dn|WIxOV#BK&)!8| zOW`;NY{{ZJF%6y=fEcJdU<*a90QDh=w7Xy{OD56h4O1t^8-A6HH4f9McH2iw)uN$M zTPiQ-wW4l|&MVkLp`;O8sZhv)|dMG?I!9*RQY6G(tUGO=(2>xd}F+gWR+?Izrq?hh~d-zv2}N zmx98~oVM-3UqoR{6sFT`n+hI`qS-FE7%3lhz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lbm>ea89ETctr8 og#%qDd4{~_2LiW1;gHiwo+0n~fxy*6VW=h None: + self._init_grid() + + def _init_grid(self) -> None: + for i in range (0,14): + for j in range(0,14): + self.grid[(i, j)] = GridCellType.FREE + for r, c in [(2,2), (2,3), (3,2), (3,3), (10,2), (10,3), (11,2), (11,3), + (2,8), (2,9), (3,8), (3,9), (10,8), (10,9), (11,8), (11,9),]: + self.grid[(r,c)] = GridCellType.RACK + for m, n in [(6,5), (6,6), (7,5), (7,6)]: + self.grid[(m,n)] = GridCellType.PLACE \ No newline at end of file diff --git a/main.py b/main.py index 7dd28e5..b4ae383 100644 --- a/main.py +++ b/main.py @@ -3,7 +3,7 @@ import pygame from wozek import Wozek import wyszukiwanie import ekran - +from grid import SearchGrid pygame.init() @@ -19,12 +19,13 @@ def main(): if event.type == pygame.MOUSEBUTTONDOWN: # lewy przycisk myszy if event.button == 1: + grid_points = SearchGrid() x = pygame.mouse.get_pos()[0] y = pygame.mouse.get_pos()[1] wiersz = ekran.sprawdz_ktory_wiersz(x) kolumna = ekran.sprawdz_ktora_kolumna(y) docelowy_stan = wyszukiwanie.Stan(wiersz * 70, kolumna * 70, 0) - wezel = wyszukiwanie.wyszukiwanie_bfs(wozek.obecnyStan, docelowy_stan) + wezel = wyszukiwanie.wyszukiwanie_bfs(wozek.obecnyStan, docelowy_stan, grid_points) sciezka = wyszukiwanie.znajdz_sciezke(wezel) wozek.przemiesc_wozek_po_sciezce(sciezka) diff --git a/wyszukiwanie.py b/wyszukiwanie.py index 367adb1..dd83e14 100644 --- a/wyszukiwanie.py +++ b/wyszukiwanie.py @@ -1,13 +1,4 @@ -class SearchSpace: - def __init__(self): - self.grid = [['1'] * 10 for _ in range(10)] # create a 10x10 grid of cells - for r, c in [(2, 2), (2, 3), (3, 2), (3, 3), (8, 2), (8, 3), (9, 2), (9, 3), - (2, 8), (2, 9), (3, 8), (3, 9), (8, 8), (8, 9), (9, 8), (9, 9)]: - self.grid[r][c] = 'X' # set the cells with a shelf to not passable - - def is_passable(self, x, y): - return 0 <= x < 10 and 0 <= y < 10 and self.grid[y][x] != 'X' - +from grid import GridCellType class Stan: def __init__(self, x, y, kierunek): @@ -21,7 +12,7 @@ class Wezel: self.stan = stan self.rodzic = rodzic -def nastepnik(wezel, licznik): +def nastepnik(wezel, licznik, search_grid): # gora -> prawo -> dol -> lewo | obrot w prawo # gora -> lewo -> dol -> prawo | obrot w lewo # 0 gora 1 prawo 2 dol 3 lewo @@ -44,11 +35,14 @@ def nastepnik(wezel, licznik): # sprawdzenie czy nie wyjdzie poza plansze if 0 <= x <= 910 and 0 <= y <= 910: - wezly.append(ruch_w_przod) + x1 = x / 70 + y1 = y / 70 + if search_grid.grid[(x1,y1)] is GridCellType.FREE: + wezly.append(ruch_w_przod) return wezly -def wyszukiwanie_bfs(stan_poczatkowy, stan_docelowy): +def wyszukiwanie_bfs(stan_poczatkowy, stan_docelowy, search_grid): pierwszy_wezel = Wezel(stan_poczatkowy, 0) fringe = [pierwszy_wezel] odwiedzone = [pierwszy_wezel] @@ -61,7 +55,7 @@ def wyszukiwanie_bfs(stan_poczatkowy, stan_docelowy): mapa[licznik] = wezel if stan_docelowy.x == wezel.stan.x and stan_docelowy.y == wezel.stan.y: return wezel - lista1 = nastepnik(wezel, licznik) + lista1 = nastepnik(wezel, licznik, search_grid) for obecny_wezel in lista1: flag_juz_odwiedzony = 0 for odwiedzony_wezel in odwiedzone: