From e3690eb85a9456cc1f3ccda751ae7d9fdf2d3b03 Mon Sep 17 00:00:00 2001 From: Hampus Date: Tue, 4 Jan 2022 18:55:51 +0100 Subject: refactor: improve even more --- src/maze.h | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) (limited to 'src/maze.h') 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 -- cgit v1.2.3-18-g5258