From e66b0d4a59e43d40497b0866025d71f738a3188d Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewski Date: Thu, 14 May 2020 11:24:51 +0200 Subject: [PATCH] Removed redundant draw method params --- src/game/Map.py | 14 +++++++------- src/game/Screen.py | 22 +++++++++++----------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/game/Map.py b/src/game/Map.py index 13c2215..e2520c2 100644 --- a/src/game/Map.py +++ b/src/game/Map.py @@ -88,27 +88,27 @@ class Map: for col, tile in enumerate(tiles): if tile == 's': object = TerrainTile(col, row, 'sand.png', self.tileSize, 15) - self.screen.draw(object, Locations.MAP, 0, 0) + self.screen.draw(object, Locations.MAP) self.terrainTilesList.append(object) elif tile == ',': object = TerrainTile(col, row, 'floor.png', self.tileSize, 0) - self.screen.draw(object, Locations.MAP, 0, 0) + self.screen.draw(object, Locations.MAP) self.terrainTilesList.append(object) elif tile == '.': object = TerrainTile(col, row, 'grass.png', self.tileSize, 10) - self.screen.draw(object, Locations.MAP, 0, 0) + self.screen.draw(object, Locations.MAP) self.terrainTilesList.append(object) elif tile == 'c': object = TerrainTile(col, row, 'clay.png', self.tileSize, 20) - self.screen.draw(object, Locations.MAP, 0, 0) + self.screen.draw(object, Locations.MAP) self.terrainTilesList.append(object) elif tile == 'x': object = TerrainTile(col, row, 'water.png', self.tileSize, 0) - self.screen.draw(object, Locations.MAP, 0, 0) + self.screen.draw(object, Locations.MAP) self.collidables.add(object) elif tile == 'w': object = TerrainTile(col, row, 'wall.png', self.tileSize, 0) - self.screen.draw(object, Locations.MAP, 0, 0) + self.screen.draw(object, Locations.MAP) self.collidables.add(object) def getEntityOnCoord(self, coord): @@ -137,7 +137,7 @@ class Map: # TODO: REMOVE DONT ADD def addEntity(self, entity, DONTADD=False): # TODO: This method should set entities coords - self.screen.draw(entity, Locations.MAP, 0, 0) + self.screen.draw(entity, Locations.MAP) # dodajemy bo wszystkie entity są kolizyjne self.collidables.add(entity) if not DONTADD: diff --git a/src/game/Screen.py b/src/game/Screen.py index df334c5..cdede0f 100644 --- a/src/game/Screen.py +++ b/src/game/Screen.py @@ -78,14 +78,14 @@ class Screen: def __initUi__(self): self.ui = Ui(self.getUiWidth(Locations.RIGHT_UI), self.getUiWidth(Locations.LEFT_UI), self.winY, self.gameObject.ingameTimer) - self.draw(self.ui.timerTextView, Locations.LEFT_UI, 0, 0) - self.draw(self.ui.isDayTextView, Locations.LEFT_UI, 0, 0) - self.draw(self.ui.console, Locations.LEFT_UI, 0, 0) - self.draw(self.ui.healthTextView, Locations.RIGHT_UI, 0, 0) - self.draw(self.ui.healthBar, Locations.RIGHT_UI, 0, 0) - self.draw(self.ui.hungerTextView, Locations.RIGHT_UI, 0, 0) - self.draw(self.ui.hungerBar, Locations.RIGHT_UI, 0, 0) - self.draw(self.ui.staminaTextView, Locations.RIGHT_UI, 0, 0) - self.draw(self.ui.staminaBar, Locations.RIGHT_UI, 0, 0) - self.draw(self.ui.thirstTextView, Locations.RIGHT_UI, 0, 0) - self.draw(self.ui.thirstBar, Locations.RIGHT_UI, 0, 0) + self.draw(self.ui.timerTextView, Locations.LEFT_UI) + self.draw(self.ui.isDayTextView, Locations.LEFT_UI) + self.draw(self.ui.console, Locations.LEFT_UI) + self.draw(self.ui.healthTextView, Locations.RIGHT_UI) + self.draw(self.ui.healthBar, Locations.RIGHT_UI) + self.draw(self.ui.hungerTextView, Locations.RIGHT_UI) + self.draw(self.ui.hungerBar, Locations.RIGHT_UI) + self.draw(self.ui.staminaTextView, Locations.RIGHT_UI) + self.draw(self.ui.staminaBar, Locations.RIGHT_UI) + self.draw(self.ui.thirstTextView, Locations.RIGHT_UI) + self.draw(self.ui.thirstBar, Locations.RIGHT_UI)