From 226d897ecab15ee1e0fb8a864cc4de724e57eb08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kore=C4=8Dek?= Date: Wed, 14 Sep 2022 21:10:41 +0200 Subject: [PATCH] Strategicka: fix --- 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 11b56e7..6ba4af1 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] % self.map_height - new_position_x = id_positions[member["id"]][1] + move_vect[1] % self.map_width + 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."))