From 87fc6bea1f540458ef52cc1182ce8813a6568cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Czeka=C5=84ski?= Date: Sun, 26 Apr 2020 18:34:38 +0200 Subject: [PATCH] Fix not adding grass tiles to terrainTilesList --- src/game/Map.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/Map.py b/src/game/Map.py index bdbfbcf..0a8e57b 100644 --- a/src/game/Map.py +++ b/src/game/Map.py @@ -89,7 +89,7 @@ class Map: self.terrainTilesList.append(object) elif tile == '.': object = TerrainTile(col, row, 'grass.png', self.tileSize, 10) - self.screen.draw(TerrainTile(col, row, 'grass.png', self.tileSize, 10), Locations.MAP, 0, 0) + self.screen.draw(object, Locations.MAP, 0, 0) self.terrainTilesList.append(object) elif tile == 'c': object = TerrainTile(col, row, 'clay.png', self.tileSize, 20) @@ -112,7 +112,7 @@ class Map: return result # W przypadku podania kordynatów playera, powinno zwrócić teren na którym jest player - def getTileOnCoord(self, coord): + def getTileOnCoord_old(self, coord): result = None for tile in self.terrainTilesList: if tile.rect.x == coord[0] and tile.rect.y == coord[1]: