From b7d350b6473122ace40fbbc156f4fdf03485a6f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kore=C4=8Dek?= Date: Wed, 14 Sep 2022 21:05:52 +0200 Subject: [PATCH] Strategicka: fix logiky --- server/hra/game.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/hra/game.py b/server/hra/game.py index f6742c6..11b56e7 100644 --- a/server/hra/game.py +++ b/server/hra/game.py @@ -238,8 +238,8 @@ class Occupy(Logic): if member["action"] is None: continue move_vect = self.MOVE_VECTORS[member["action"]] - new_position_y = id_positions[member["id"]][0] + move_vect[0] - new_position_x = id_positions[member["id"]][1] + move_vect[1] + new_position_y = id_positions[member["id"]][0] + move_vect[0] % self.map_height + new_position_x = id_positions[member["id"]][1] + move_vect[1] % self.map_width if hills[new_position_y][new_position_x]: warns.append(self.generate_warn(member["id"], "Voják se snaží vylézt na skálu, což nejde."))