From bb44747770ac6e421280efbe160004b1e39ee4f8 Mon Sep 17 00:00:00 2001 From: Camden Dixie O'Brien Date: Mon, 4 Nov 2024 20:44:20 +0000 Subject: [PATCH] Pause for longer while solving --- main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; }