From db23a056ec97e4e3655b14ae7409b65f811d9b86 Mon Sep 17 00:00:00 2001 From: RomulAugustus <87079566+RomulAugustus@users.noreply.github.com> Date: Mon, 25 Jul 2022 16:53:34 +0300 Subject: [PATCH] fixed conditions for adding player marks --- GameMap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GameMap.py b/GameMap.py index b325ab1..3c8ea47 100644 --- a/GameMap.py +++ b/GameMap.py @@ -18,7 +18,7 @@ class GameMap: def add_player_mark(self, x, y, player): - if x <= self.max_size_x and y <= self.max_size_y: + if (x <= self.max_size_x and y <= self.max_size_y) and (x >= 0 and y >= 0): self.data[(x,y)] = player player.record_mark(x, y) else: