aboutsummaryrefslogtreecommitdiff
path: root/src/maze.h
diff options
context:
space:
mode:
authorHampus <hampus@hampusmat.com>2022-01-04 18:55:51 +0100
committerHampus <hampus@hampusmat.com>2022-01-05 20:09:27 +0100
commite3690eb85a9456cc1f3ccda751ae7d9fdf2d3b03 (patch)
tree2fdd32726d753495bf562102a0531101eaa1ddfd /src/maze.h
parent1bed3ac57906b26ef05b25c2bc5c1dca424dba4a (diff)
refactor: improve even more
Diffstat (limited to 'src/maze.h')
-rw-r--r--src/maze.h28
1 files changed, 4 insertions, 24 deletions
diff --git a/src/maze.h b/src/maze.h
index 8c66ff7..1a3937f 100644
--- a/src/maze.h
+++ b/src/maze.h
@@ -2,34 +2,14 @@
#define MAZE_H
#include "position_stack.h"
-
-typedef struct Dimensions
-{
- int width;
- int height;
-} Dimensions;
-
-typedef struct Maze
-{
- char ***grid;
- Dimensions dimens;
- Dimensions full_dimens;
-} Maze;
-
-Maze maze_create(Dimensions dimens, char *wall);
-
-void maze_destroy(Maze *maze);
+#include "grid.h"
/**
- * Excavates a maze.
- *
- * This is what creates the actual maze.
+ * Creates a maze from a grid
*
- * @param maze The maze to excavate
+ * @param grid A grid
* @param start_pos Start position
*/
-void maze_excavate(Maze *maze, Position start_pos);
-
-void maze_print(Maze maze);
+void grid_to_maze(Grid grid, Position start_pos);
#endif