1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-19 13:01:37 +02:00

just try visitable dir

This commit is contained in:
Justin Lin
2020-11-11 08:43:14 +08:00
parent 37d7e4b3e3
commit a62fe5fff5

View File

@@ -153,16 +153,16 @@ function go_maze(x, y, maze, rows, columns, x_circular = false, y_circular = fal
); );
// try four directions // try four directions
function walk_around_from(x, y, dirs, maze, rows, columns, x_circular, y_circular, i = 4, seed) = function walk_around_from(x, y, dirs, maze, rows, columns, x_circular, y_circular, i = 0, seed) =
// all done? // all done?
i > 0 ? i < len(dirs) ?
// not yet // not yet
walk_around_from(x, y, dirs, walk_around_from(x, y, dirs,
// try one direction // try one direction
try_routes_from(x, y, dirs[4 - i], maze, rows, columns, x_circular, y_circular, seed), try_routes_from(x, y, dirs[i], maze, rows, columns, x_circular, y_circular, seed),
rows, columns, rows, columns,
x_circular, y_circular, x_circular, y_circular,
i - 1, i + 1,
seed) seed)
: maze; : maze;