From 4d6de52e8c47aa923384d1424a0c1bf9c79f39ca Mon Sep 17 00:00:00 2001 From: Mateusz Date: Sat, 25 Apr 2020 23:33:55 +0200 Subject: [PATCH] add cost attribute --- src/game/TerrainTile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/TerrainTile.py b/src/game/TerrainTile.py index e5b7db7..9af1c78 100644 --- a/src/game/TerrainTile.py +++ b/src/game/TerrainTile.py @@ -4,7 +4,7 @@ import pygame class TerrainTile(pygame.sprite.Sprite): - def __init__(self, x, y, texture, tileSize): + def __init__(self, x, y, texture, tileSize, cost): super().__init__() terrainTexturesPath = Path("./data/images/terrain").resolve() self.image = pygame.image.load(str(terrainTexturesPath / texture)).convert() @@ -14,5 +14,5 @@ class TerrainTile(pygame.sprite.Sprite): self.y = y self.rect.x = x * tileSize self.rect.y = y * tileSize + self.cost = cost - # TODO : rozne koszty map tilesów