Remove early return in generation routine
This commit is contained in:
parent
95133052d3
commit
a741490c4c
3
main.c
3
main.c
@ -90,9 +90,6 @@ static void generate_maze(vec2_t p, vec2_t g)
|
|||||||
draw_maze();
|
draw_maze();
|
||||||
nanosleep(&pause, NULL);
|
nanosleep(&pause, NULL);
|
||||||
|
|
||||||
if (p.x == g.x && p.y == g.y)
|
|
||||||
return;
|
|
||||||
|
|
||||||
dir_t visit[] = { LEFT, RIGHT, UP, DOWN };
|
dir_t visit[] = { LEFT, RIGHT, UP, DOWN };
|
||||||
for (int i = 3; i > 0; --i) {
|
for (int i = 3; i > 0; --i) {
|
||||||
const int r = rand() % (i + 1);
|
const int r = rand() % (i + 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user