From 0cca57b1fce5f1231ed4f7ab76e5531d82da9155 Mon Sep 17 00:00:00 2001 From: jerem <114385056+Jerem-EstIcI@users.noreply.github.com> Date: Tue, 21 May 2024 09:42:20 +0200 Subject: [PATCH] quelques changements --- __pycache__/gen_lab.cpython-310.pyc | Bin 3692 -> 3045 bytes __pycache__/res_lab.cpython-310.pyc | Bin 0 -> 1660 bytes main.py | 11 +++++++---- res_lab.py | 8 +++++--- 4 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 __pycache__/res_lab.cpython-310.pyc diff --git a/__pycache__/gen_lab.cpython-310.pyc b/__pycache__/gen_lab.cpython-310.pyc index d84fc591fe29dba5cc625f737e00aeb56973e1d4..1198905a08440c853d61b37726d42a42cc2bed79 100644 GIT binary patch literal 3045 zcmb_e&2QX96rUM;cb&~94Iv`i@@4T=7TVCJARt6lrB-SYRWB7BRw>52GfACz?PP36 zYP2gM5($ocTsgEtAabraa?1aJgoU`kB?tZi4v62gcO7q9q)OB)zkM_B&3kX&d-L;z zQ&V+@=g(``SAUvg><=209|MC+c%xT9B$M1{J>KS=c;Sn-xXPp<%{?Z~UC}nAxXD_T zL+G*=Pixu@q!+|Dx-?OK1O}JzMz4Y>*5;D6h2&&F8hfm5N>f(wUy)T=!+%v;Fg%e~ zud3j>+esF&tZw7EdaxfH>}xmn!oZfNlfd@f&K(V>x0S6A_M_0>c00bxl)L11^bk+) zWxSCM(&v5Vus&PIE}QswFup795tr}FNPd7?W{F&Hy4vj>{1|JsRLq^VrPs5Uh^ipU zVoFL86?$3)+o3nMa3>6uR8fT0#M;DrK@mH7JZr~p2l6%T`M$Ed*q@>>z$v92?7VPr z$Pwy|mYEs|CACJz(}_YgHDIhIQZrKis;)qNpJ{4_zu&vOwDMu3bhHv`=`EgLJb&Sx zH&?EN-2|J8qm`>(d@bp$pbo=CudJznyf19tNiE0m0xxzP3#OtfNY!faX})tJFWtgO z-lYgfj|qlCpmvM4K|W`zTyiP)teAbl*7+{K!gl$9$7nYiOQXql#T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QdkKja82 zIIbx_2t211wKpS`xMAX;H3;B@2&ud{3bx%<^tjtz3tkss6+5j5UfU1jIp?BowmS;- z1t<6ri>&tdygBC*LOC%4`(8hlp@pNJM+^5RO6)+aVb9$g$3g)xk63x}z7tyn5i#OV zi+-2{I$^2np}**Age6~ew@%e+@LryWj4ij&iA%m zf7j1122slm;v1+G4y7u_r~tcbo(4o+sBsEjZAC#8hTa}mv{eVgs!2UeZ#;+XoPCw? zlzydSa6OPDE|Z{y4`?pxraF#4oj_&;UZ|+6Ue!Z43@omqH&hc48TT{3p7D)5r8h`V z)1hcls1l!nn5~-JX0P zN9lrW)=2{bn`OXIzXqK0u7P4E;;DGXfJvT;4MY8uf-7gVvVD8V|M`eNI7vP4TbsqWgFN+&>UoNt-n?0fk@u(OuE81j$xN-ZGRweHXj30x zWpzHq()2<4Pq^lsgLC13p_U_9?$uIxy$m;ir+Nz;zcT|-qSUqhy>NdI1nGET!;ZaH z6iP1!YAx91s5KMtc~;q^)3E@qmD6p*a+UJ8Jw;K~EJRj`6IUgf;f3-rs~tn+*bhBA zTpifP3lNj`X~5RxHhyP$tyiXXEtfTJi%D+(Zcj}D^cLTl?m@g1ZV2SWJ46{8FG8 zSh*+QDFASS+$Lp^M<3Oarbh-P+gwYOlt<8@MGVs8n4c*k5{c+>h<1K0w3^Cj^pdtT z&WKizQ_}XRp~!2fCy(9B_{g5oXob(9=T+WE&-me)!-xa@@H-vW7o!dIqwiJjE3zzz z`KZ35VitboJ}L6GDAsH17_~ukMu*_}pAub(U80V@QN4z1)Zga1*bU?I_091Thpujp zA9fO-?sfl8zWqB(aX&c;z8G*`-N>&-eOfzAWfN}O3;amsA0MBof6p!Q;( Q$_<*Un2v*Sgqs#G0d=rT_y7O^ diff --git a/__pycache__/res_lab.cpython-310.pyc b/__pycache__/res_lab.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e86912ed3a96d313c2547aaa899b967050a49025 GIT binary patch literal 1660 zcmZWp&2JM&6rZoP7uNPprqZ&=MopN_!ZEu03a+`hfP9kB13;kMP-FIk0>xGNHwY zn?Dk!WyZC<#16${w()){E1KV?Dr1>kVVPQCT8)Icu0^R?V|y3MIsWpIu=f_$9(I4s zB=pL>AU*jhEQyhKLMJb>674J(CmS(i=je-z=&G)YR?hFwrNy~#MD3ZX?gVn45%~Rh zj3(a>UDZ|4doAQv-eYBsZ7t!t20N&ci@q4OxWsflV~2_(YE;c%pHazX)CDt?iOr~r zGYN5Ucf7T|Z-!CwIt;engo7ZB!eAUnuhK9zflhoSGyUybdSBD9~Z|z@xq0 zj>tW;6}<{`ZJ$koi1~s9C1);LnB}Js;O0(jCgFK3 zEuDKFVv_>;q@-y>wG;{&Cy$Pdl%0fHo*xRdiwg(`pN}dNN3;_l)>jK_31VH%#B-vQ zqhzLNw7=7yqRl|p1q50Tn1@J0VRg-6@3X0lo|U=+dF*$N+E_xt6HqF;JNH#mva~^$ zg!A=w358RE5;D46?$gR4tG<3&LcteMYB@?=K!`%S>u8OETwW#)1!oB^HJ3@x5zZrB z=FxSyZm5HdEAkndQ3cX-5GY_tEA!_E8;{eVd$6*goeYy8i~?8WpxcqIISsC7=4#ui z9rsDE1`+_;Q@gQ!>*Ri~eQawJzd_JS57i6i(4}s_foOmzKFFbD8?wn8C#28Y|2A6< p{AqB|= 10: lab[i][j] = lab[i][j+1] + 1 nbfois+=1 - print("labyrinthe avec longueur :",lab) + print("labyrinthe avec une longueur du plus court chemin de:",lab[dim-2][dim-2]-10,"avec:",lab) return lab def lab_forme(lab,dim): @@ -29,8 +29,10 @@ def res_lab(lab, dim): reslab = longueur_lab(lab, dim) posx = dim - 2 posy = dim - 2 - if reslab[posx][posy]==3 or reslab[posx][posy]==5: - return + if reslab[posx][posy]==3 or reslab[posx][posy]==5: #erreur dans la création du labyrinthe + #ou dans la création de la longueur des pts + + return reslab while not (posx == 1 and posy == 1): if reslab[posx-1][posy] == reslab[posx][posy] - 1: reslab[posx][posy] = 5