1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-19 13:01:37 +02:00
This commit is contained in:
Justin Lin
2020-11-18 17:40:31 +08:00
parent aab600bd69
commit aa9e42bd92

View File

@@ -1,18 +1,5 @@
use <_mz_comm.scad>; use <_mz_comm.scad>;
// create a starting maze for being visited later.
function starting_maze(rows, columns) = [
for(y = [1:rows])
for(x = [1:columns])
block(
x, y,
// all blocks have top and right walls
3,
// unvisited
false
)
];
// find out the index of a block with the position (x, y) // find out the index of a block with the position (x, y)
function indexOf(x, y, maze, i = 0) = function indexOf(x, y, maze, i = 0) =
i > len(maze) ? -1 : ( i > len(maze) ? -1 : (