From 28618b65b32009fd4e718578b3314e2ae91927f7 Mon Sep 17 00:00:00 2001 From: Kirill Petrashin Date: Fri, 27 Mar 2026 09:02:38 +0300 Subject: Combine two functions into one in path.{c,h} --- path.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'path.h') diff --git a/path.h b/path.h index 624516c..3ad089d 100644 --- a/path.h +++ b/path.h @@ -4,8 +4,8 @@ #include "structs.h" #include "map.h" -Path breadth_first_search_path_4dir(Map map, size_t width, size_t height, Position start, Position end, char visited[height][width], char should_anim); -Path breadth_first_search_path_8dir(Map map, size_t width, size_t height, Position start, Position end, char visited[height][width], char should_anim); +/* dirs can be 4 or 8 to disallow or allow diagonal movement */ +Path breadth_first_search_path(int dirs, Map map, size_t width, size_t height, Position start, Position end, char visited[height][width], char should_anim); Path astar_path_4dir(Map map, size_t width, size_t height, Position start, Position end); size_t manhattan_distance(Position a, Position b); -- cgit v1.2.3