1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-21 05:52:16 +02:00

definitly not visited

This commit is contained in:
Justin Lin
2020-11-11 08:29:15 +08:00
parent fbbcdd34fe
commit d66733fdd3

View File

@@ -116,7 +116,7 @@ function visit_left(x, y, maze, columns) =
nx = x_minus_one < 1 ? x_minus_one + columns : x_minus_one 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 // 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, y_minus_one = y - 1,
ny = y_minus_one < 1 ? y_minus_one + rows : y_minus_one 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) // 0(right), 1(top), 2(left), 3(bottom)