From 18ab66459c63c617d7562801bf5596053f78f4a8 Mon Sep 17 00:00:00 2001 From: domjag5 Date: Thu, 28 Apr 2022 16:50:19 +0200 Subject: [PATCH] dopasowanie kosztu, obracanie agenta --- .idea/Sztuczna_Inteligencja_Gr16.iml | 2 +- .idea/misc.xml | 2 +- Ikony/test1_ikona.png | Bin 30054 -> 30054 bytes Ikony/test2_ikona.png | Bin 0 -> 30054 bytes agent.py | 2 ++ main.py | 4 +++- 6 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 Ikony/test2_ikona.png diff --git a/.idea/Sztuczna_Inteligencja_Gr16.iml b/.idea/Sztuczna_Inteligencja_Gr16.iml index f754d4e..4335812 100644 --- a/.idea/Sztuczna_Inteligencja_Gr16.iml +++ b/.idea/Sztuczna_Inteligencja_Gr16.iml @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 89fb180..0a4fd2a 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/Ikony/test1_ikona.png b/Ikony/test1_ikona.png index 259cfb1e7752f759cd719d21dd5fb07e359e71f4..8786166f893c7e3e7667021d3691ba0d5c7b2c17 100644 GIT binary patch literal 30054 zcmeI(O|H{G3 zy{ebrPI|(fjG9(}x^{wTMVa7gT&5ME&{tOh{{i}Hq7_{Vw_)={U!kx30{+Y!?W>Q! zo`<*Xr-RDlaKUt<{{`il;dv`@_*~(#xqv?so|M;L83~u|m*JV=Nh@XeT;a00fIkwR zl-FMw3774c;hEt{cQU7*pTB>;)7EpwX*XTCY%buBgeTn<-?ea9`MF>PE9oZ1Jt)cW zIIOsd6oHi_!{e~xCQ<}ek_?Z-iknCgSV=NG4l8aVMPMb#@Hnivi4=jAB*Wvd;wDlA zR+0>l!-|_o5m-qwJPs>vB1K>&$?!O=xQP^jl_bOCu;M0C1Xhv^kHdxKFFys$+lp zACjTW@n?!+MbZncymix1dzf6>$0p@xwdFhaFP{CQ&6(WN_>8fL=xCW! ztctnvtaK>TO8=0BdLBTzL~bGgD+gHUBw6S-nm<4~1Wv$z6QQ=p2irf~II&4Q}8 z8t3Y=nh14>)gYJOYA)1KRwGw(zUamhw^Eejdt!jco0; z66)B5UaORpD|7W)31zR20{nr!3baZ?`8Ld+_R3yy0iIlFuU@`yreCtv^!rVF=!j;WPaT!1I-)e5ZgNvvw!{2tO$)ge`T zFx6U>ze4agPGB;h#J~ahP-TtsR=$_Oq*feLs})$4e=70`1}1CnRe>u|fDcu(RpH~E zPcSg4701*{D=xs3_DU-*z?1e$D=xs3_DU-*z?1e$D=xs3_DU-*z?1e$D=xs3_DU-* zz?1e$D=xs3_DU-*z?1e$D=xs3_DU-*z?1e$D=xs3_DU-*z?1e$D=xs3_GrKxR@Yn;^vp;A4@S=lT8p<%DMmA&Ft_KI8CD{f`4xYY!` F`U4QwIUN81 diff --git a/Ikony/test2_ikona.png b/Ikony/test2_ikona.png new file mode 100644 index 0000000000000000000000000000000000000000..d7136da67763a244b7bfd525289b3b371ff9f294 GIT binary patch literal 30054 zcmeI(K~BRk6olb&3vK{QRvdsG3vPk90c#Ee_bgTtMUned{cUXL*>9>gN}OqGe~d~O z?c2xK_i4JlrtNcjd@hfN)8jP$vYej|md)S$@BaJK&)NTd|1yhQ!9P@*VUd;Yzlf~3 zVPXodx08gq{vf=_fsb0y73-F|RB`Yq#lj@bMxByS8SF*|kvPu*= z^!Xc;B1kEz@(E>&C`H$hOzWkZzf$Wx&35JllkAGd8+*koxGx{vHkpD z2AoX313qH*nnio;a|DgswQsIj?E*z))qmhKDM}6$ENO zS171GTmhl(;|dFPD_3wR&LybXDs4@Q^&8se+4Z>rcTAAPWsV2*$(C%gTn=W>3VV1d ilZ}LxF&CcUY!A(R@WHLmx*y!+%JNsDdFM*9{i%P+*Ck8< literal 0 HcmV?d00001 diff --git a/agent.py b/agent.py index 74c2c3d..036502d 100644 --- a/agent.py +++ b/agent.py @@ -175,9 +175,11 @@ class Agent(Obserwowany): def obrocSieWLewo(self): self.kierunek = self.kierunek.kierunekNaLewo() + self.tekstura = pygame.transform.rotate(self.tekstura, 90) def obrocSieWPrawo(self): self.kierunek = self.kierunek.kierunekNaPrawo() + self.tekstura = pygame.transform.rotate(self.tekstura, 270) def narysujAgenta(self): self.krata.okno.blit(self.tekstura, (self.hitbox.x, self.hitbox.y)) diff --git a/main.py b/main.py index 601942c..d3df40d 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,7 @@ import os +import pygame.transform + from agent import * from okno import * from ramy_czyli_wiedza_agenta import * @@ -18,7 +20,7 @@ def dodaj_agenta(): # random.randint(0, LICZBA_POL_W_POZIOMIE - BOK_AGENTA1_W_POLACH)) # pole_lewe_gorne = PoleKraty(krata_magazynu, LICZBA_POL_W_PIONIE - BOK_AGENTA1_W_POLACH, int(LICZBA_POL_W_POZIOMIE / 2)) pole_lewe_gorne = PoleKraty(krata_magazynu, 0, 0) - pom = 'traktor_ikona.png' + pom = 'test2_ikona.png' ikona = pygame.transform.scale(pygame.image.load(os.path.join('Ikony', pom)), (BOK_AGENTA1, BOK_AGENTA1)) Agent(krata_magazynu, pole_lewe_gorne, ikona)