From b4cc44acc3d3937746912892804a88fdef495d72 Mon Sep 17 00:00:00 2001 From: ThisBirchWood Date: Sat, 22 Mar 2025 19:32:52 +0000 Subject: [PATCH] PATCH: for python 3.13 --- controllers/map_coord_controller.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/controllers/map_coord_controller.py b/controllers/map_coord_controller.py index 3e9c5ba..0c55d4c 100644 --- a/controllers/map_coord_controller.py +++ b/controllers/map_coord_controller.py @@ -19,13 +19,13 @@ class MapCoordController: self.screen_height = screen_height def screen_to_map(self, x, y): - mapped_x = mapped_value(x, 0, self.screen_width, self.map_min_x, self.map_max_x) - mapped_y = mapped_value(y, 0, self.screen_height, self.map_min_y, self.map_max_y) + mapped_x = int(mapped_value(x, 0, self.screen_width, self.map_min_x, self.map_max_x)) + mapped_y = int(mapped_value(y, 0, self.screen_height, self.map_min_y, self.map_max_y)) return mapped_x, mapped_y def map_to_screen(self, x, y): - mapped_x = mapped_value(x, self.map_min_x, self.map_max_x, 0, self.screen_width) - mapped_y = mapped_value(y, self.map_min_y, self.map_max_y, 0, self.screen_height) + mapped_x = int(mapped_value(x, self.map_min_x, self.map_max_x, 0, self.screen_width)) + mapped_y = int(mapped_value(y, self.map_min_y, self.map_max_y, 0, self.screen_height)) return mapped_x, mapped_y if __name__ == "__main__":