Reorganize code into library for reuse

This commit is contained in:
2021-05-08 15:58:59 -04:00
parent d1f144aca7
commit aa4d8efdd2
20 changed files with 140 additions and 75 deletions

18
lib/path.h Normal file
View File

@@ -0,0 +1,18 @@
#ifndef _PATH_H
#define _PATH_H 1
#include "grid.h"
typedef struct {
unsigned row, col;
} block_t;
typedef struct {
size_t length;
block_t *nodes;
} path_t;
int shortest_path(mazegrid_t const* maze, path_t* result);
void free_path(path_t* p);
#endif // !def(_PATH_H)