aboutsummaryrefslogtreecommitdiff
path: root/path.h
blob: 330ea3d1a129b063e18bc77502acfa1ebf66df03 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef ASTAR_H_
#define ASTAR_H_

#include "structs.h"
#include "map.h"

/* 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 dijkstra_path(int dirs, Map map, size_t width, size_t height, Position start, Position end, char visited[height][width], char should_anim);

size_t manhattan_distance(Position a, Position b);

void path_free(Path path, size_t height);

#endif /* ASTAR_H_ */