algorithm.h
Raw
1#ifndef ALGORITHM_H
2#define ALGORITHM_H
3#include <stddef.h>
4#include <game.h>
5
6struct game make_maze(size_t y, size_t x);
7typedef darray(struct point) pointarr;
8
9//algorithm terminates with no path if target is not found within maxdist
10//result contains target as well as the source point
11//so even if next to the target, the result arr is at least 2 items big
12pointarr astar(struct game *g, struct point start, struct point target, size_t maxdist);
13
14
15#endif //ALGORITHM_H
16