diff --git a/g_python/hparsers.py b/g_python/hparsers.py index 2d368e4..80a1452 100644 --- a/g_python/hparsers.py +++ b/g_python/hparsers.py @@ -508,8 +508,8 @@ def coords_to_index(self, x: int, y: int) -> int: return int(y * self.width + x) def index_to_coords(self, index: int) -> (int, int): - y = int(index % self.width) - x = int((index - y) / self.width) + x = index % self.width + y = index // self.width return x, y def get_tile_value(self, x: int, y: int) -> int: