mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-19 13:01:37 +02:00
refactor
This commit is contained in:
@@ -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 : (
|
||||||
|
Reference in New Issue
Block a user