From ab4031075ff91db5bf1ef38b7478130fd8e45dc0 Mon Sep 17 00:00:00 2001 From: Dan Dembinski Date: Wed, 26 May 2021 12:15:43 -0400 Subject: [PATCH] Looks like I fixed some spacing at some point. Moved Game_map and render_functions to the parent directory. For some reason they were in the venv folder. Added requirements.txt. Going to begin updating code to use latest version of tcod. --- engine.py | 3 ++- venv/game_map.py => game_map.py | 0 map_objects.py | 4 ++-- venv/render_functions.py => render_functions.py | 0 requirements.txt | 5 +++++ 5 files changed, 9 insertions(+), 3 deletions(-) rename venv/game_map.py => game_map.py (100%) rename venv/render_functions.py => render_functions.py (100%) create mode 100644 requirements.txt diff --git a/engine.py b/engine.py index 08e0b8b..5603bad 100644 --- a/engine.py +++ b/engine.py @@ -8,6 +8,7 @@ from input_handlers import handle_keys def main(): screen_width = 80 screen_height = 50 + map_width = 80 map_height = 50 @@ -30,8 +31,8 @@ def main(): con = tc.console_new(screen_width, screen_height) game_map = GameMap(map_width, map_height) - #game_map.make_map() game_map.make_map(max_rooms, room_min_size, room_max_size, map_width, map_height, player) + key = tc.Key() mouse = tc.Mouse() diff --git a/venv/game_map.py b/game_map.py similarity index 100% rename from venv/game_map.py rename to game_map.py diff --git a/map_objects.py b/map_objects.py index 2624904..389a6fe 100644 --- a/map_objects.py +++ b/map_objects.py @@ -21,8 +21,8 @@ class Rect: self.y2 = y + h def center(self): - center_x = int((self.x1 + self.x2) /2 ) - center_y = int((self.y1 + self.y2) /2 ) + center_x = int((self.x1 + self.x2) / 2) + center_y = int((self.y1 + self.y2) / 2) return (center_x, center_y) def intersect(self, other): diff --git a/venv/render_functions.py b/render_functions.py similarity index 100% rename from venv/render_functions.py rename to render_functions.py diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..83c3d22 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +cffi==1.14.5 +numpy==1.20.3 +pycparser==2.20 +tcod==12.5.0 +typing-extensions==3.10.0.0