Add API function to solve maze
This commit is contained in:
@@ -22,6 +22,15 @@ typedef enum {
|
||||
EDGE_LEFT
|
||||
} mazeedge_dir_t;
|
||||
|
||||
typedef struct {
|
||||
size_t x, y;
|
||||
} maze_point_t;
|
||||
|
||||
typedef struct {
|
||||
size_t length;
|
||||
maze_point_t* nodes;
|
||||
} maze_path_t;
|
||||
|
||||
typedef struct mazeoptions mazeoptions_t;
|
||||
|
||||
void mazemaker_generate_maze(int width, int height, mazegrid_t* result);
|
||||
@@ -38,4 +47,7 @@ int mazemaker_options_set_wall_color(mazeoptions_t*, char const* color_desc);
|
||||
int mazemaker_options_set_background_color(mazeoptions_t*, char const* color_desc);
|
||||
void mazemaker_options_set_seed(mazeoptions_t*, unsigned int seed);
|
||||
|
||||
int mazemaker_solve(mazegrid_t const* maze, maze_path_t* path);
|
||||
void mazemaker_path_free(maze_path_t* path);
|
||||
|
||||
#endif // !def(_MAZEMAKER_H)
|
||||
|
||||
Reference in New Issue
Block a user