diff options
author | Hampus <hampus@hampusmat.com> | 2021-12-18 18:56:20 +0100 |
---|---|---|
committer | Hampus <hampus@hampusmat.com> | 2021-12-18 18:56:20 +0100 |
commit | 2f945e6c0edaf679d693cdfa61aeba62403dec9f (patch) | |
tree | 03079dc5f53edbbd0bb68d1ba5eb978f7c21709e /src/mazerator.c | |
parent | c29486fecc272de43c11f4f26456094ce265b6f2 (diff) |
refactor: clarify maze and stack logic
Diffstat (limited to 'src/mazerator.c')
-rw-r--r-- | src/mazerator.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mazerator.c b/src/mazerator.c index 2146b40..03bfce3 100644 --- a/src/mazerator.c +++ b/src/mazerator.c @@ -121,16 +121,13 @@ int main(int argc, char *argv[]) srand(seed); - int full_maze_height = maze_height * 2 + 1; - int full_maze_width = maze_width * 2 + 1; + struct Dimensions dimens = {.width = maze_width, .height = maze_height}; - struct MazeSize maze_size = {.width = maze_width, .height = maze_height}; - - struct Maze maze = maze_create(maze_size, wall); + struct Maze maze = maze_create(dimens, wall); struct Position start_pos = {.x = start_x, .y = start_y}; maze_excavate(maze, start_pos); - maze_print(maze.grid, full_maze_width, full_maze_height); + maze_print(maze); } |