returned the call that adds marks to players

This commit is contained in:
otomo otonami 2022-07-25 18:47:17 +03:00
parent 1d09a1016f
commit 1327480331

View File

@ -21,6 +21,7 @@ class GameMap:
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):
if (x, y) not in self.data: if (x, y) not in self.data:
self.data[(x,y)] = player self.data[(x,y)] = player
player.add_mark((x,y))
else: else:
errorMessage = "The mark is already busy by the Player" + self.data[(x, y)].get_name() errorMessage = "The mark is already busy by the Player" + self.data[(x, y)].get_name()
raise KeyError(errorMessage) raise KeyError(errorMessage)