diff --git a/main.c b/main.c index 1e64320..9d153c9 100644 --- a/main.c +++ b/main.c @@ -39,7 +39,8 @@ typedef struct { bool visited : 1; } cell_t; -static const struct timespec wait = { .tv_nsec = 5000000 }; +static const struct timespec gen_pause = { .tv_nsec = 5000000 }; +static const struct timespec solve_pause = { .tv_nsec = 10000000 }; static const vec2_t steps[] = { [LEFT] = { .x = -2, .y = 0 }, @@ -115,7 +116,7 @@ static bool generation_visit(vec2_t c, vec2_t im) maze[im.x][im.y].is_path = true; clear_path(im); clear_path(c); - nanosleep(&wait, NULL); + nanosleep(&gen_pause, NULL); return false; } @@ -130,7 +131,7 @@ static bool solve_visit(vec2_t c, vec2_t im) maze[im.x][im.y].visited = true; draw_visited(im); draw_visited(c); - nanosleep(&wait, NULL); + nanosleep(&solve_pause, NULL); return GOAL == c.x && GOAL == c.y; }