removed an unnecessary call (moved to gameLogic)

also removed a bunch of spaces
This commit is contained in:
RomulAugustus 2022-07-25 17:10:43 +03:00
parent 521e767741
commit a32d984e0c

View File

@ -20,13 +20,10 @@ class GameMap:
def add_player_mark(self, x, y, player): def add_player_mark(self, x, y, player):
if (x <= self.max_size_x and y <= self.max_size_y) and (x >= 0 and y >= 0): if (x <= self.max_size_x and y <= self.max_size_y) and (x >= 0 and y >= 0):
self.data[(x,y)] = player self.data[(x,y)] = player
player.record_mark(x, y)
else: else:
errorMessage = "The mark" + str((x,y)) + " is beyond preset max values, max_x - " + str(self.max_size_x) + ", max_y - " + str(self.max_size_y) errorMessage = "The mark" + str((x,y)) + " is beyond preset max values, max_x - " + str(self.max_size_x) + ", max_y - " + str(self.max_size_y)
raise IndexError(errorMessage) raise IndexError(errorMessage)
def clear_map(self): def clear_map(self):
self.data = {} self.data = {}