diff options
| author | Kirill Petrashin <kirill8201@yandex.ru> | 2026-03-27 09:02:38 +0300 |
|---|---|---|
| committer | Kirill Petrashin <kirill8201@yandex.ru> | 2026-03-27 09:02:38 +0300 |
| commit | 28618b65b32009fd4e718578b3314e2ae91927f7 (patch) | |
| tree | 8b6e3efc3c2eb8e0e2f5518ccffbaf55bb71d320 /path.h | |
| parent | 7e31a84be58805e3751c5aba27772bbb1716a5f5 (diff) | |
| download | astar-28618b65b32009fd4e718578b3314e2ae91927f7.tar.xz | |
Combine two functions into one in path.{c,h}
Diffstat (limited to 'path.h')
| -rw-r--r-- | path.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |
