home · contact · privacy
Fix FOV bug.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 17 Jan 2019 23:19:31 +0000 (00:19 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 17 Jan 2019 23:19:31 +0000 (00:19 +0100)
server_/game.py

index 60c0f4726950d0756dc6a8a255e1583fb2c41559..bcf41b7ddeb10bd50f3283da04b76c898bb00c7a 100644 (file)
@@ -51,7 +51,7 @@ class Map(game_common.Map):
     #    return abs(pos_1[0] - pos_2[0]) <= 1 and abs(pos_1[1] - pos_2[1] <= 1)
 
     def are_neighbors(self, pos_1, pos_2):
-        if pos_1[0] == pos_2[0] and abs(pos_1[1] - pos_2[1] <= 1):
+        if pos_1[0] == pos_2[0] and abs(pos_1[1] - pos_2[1]) <= 1:
             return True
         elif abs(pos_1[0] - pos_2[0]) == 1:
             if pos_1[0] % 2 == 0: