dopasowanie kosztu, obracanie agenta
This commit is contained in:
parent
d606f376c9
commit
18ab66459c
@ -4,7 +4,7 @@
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Python 3.10 (Sztuczna_Inteligencja_Gr16)" jdkType="Python SDK" />
|
||||
<orderEntry type="jdk" jdkName="Python 3.8 (Sztuczna_Inteligencja_Gr16)" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (Sztuczna_Inteligencja_Gr16)" project-jdk-type="Python SDK" />
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.8 (Sztuczna_Inteligencja_Gr16)" project-jdk-type="Python SDK" />
|
||||
</project>
|
Binary file not shown.
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
BIN
Ikony/test2_ikona.png
Normal file
BIN
Ikony/test2_ikona.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
2
agent.py
2
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))
|
||||
|
4
main.py
4
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)
|
||||
|
Loading…
Reference in New Issue
Block a user