From 2f945e6c0edaf679d693cdfa61aeba62403dec9f Mon Sep 17 00:00:00 2001 From: Hampus Date: Sat, 18 Dec 2021 18:56:20 +0100 Subject: refactor: clarify maze and stack logic --- src/mazerator.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/mazerator.c') 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); } -- cgit v1.2.3-18-g5258