From d66733fdd303eebaea315283d1ce69e3b680f171 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Wed, 11 Nov 2020 08:29:15 +0800 Subject: [PATCH] definitly not visited --- src/maze/_impl/_mz_blocks_impl.scad | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/maze/_impl/_mz_blocks_impl.scad b/src/maze/_impl/_mz_blocks_impl.scad index 88939815..3de204ba 100644 --- a/src/maze/_impl/_mz_blocks_impl.scad +++ b/src/maze/_impl/_mz_blocks_impl.scad @@ -116,7 +116,7 @@ function visit_left(x, y, maze, columns) = nx = x_minus_one < 1 ? x_minus_one + columns : x_minus_one ) [ - for(b = maze) [get_x(b), get_y(b)] == [nx, y] ? [nx, y, 1, visited(nx, y, maze)] : b + for(b = maze) [get_x(b), get_y(b)] == [nx, y] ? [nx, y, 1, 0] : b ]; // go down and carve the top wall of the bottom block @@ -125,7 +125,7 @@ function visit_bottom(x, y, maze, rows) = [ y_minus_one = y - 1, ny = y_minus_one < 1 ? y_minus_one + rows : y_minus_one ) - for(b = maze) [get_x(b), get_y(b)] == [x, ny] ? [x, ny, 2, visited(x, ny, maze)] : b + for(b = maze) [get_x(b), get_y(b)] == [x, ny] ? [x, ny, 2, 0] : b ]; // 0(right), 1(top), 2(left), 3(bottom)