mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-01-16 13:50:05 +01:00
refactor
This commit is contained in:
parent
18d3757079
commit
18281f72fc
@ -14,7 +14,8 @@ use <mz_square_initialize.scad>
|
||||
function mz_square(rows, columns, start = [0, 0], init_cells, x_wrapping = false, y_wrapping = false, seed) =
|
||||
let(
|
||||
init_undef = is_undef(init_cells),
|
||||
mz = init_undef ? mz_square_initialize(rows, columns) : init_cells
|
||||
mz = init_undef ? mz_square_initialize(rows, columns) : init_cells,
|
||||
directions = function(x, y, cells, seed) rand_dirs(x, y, cells, seed)
|
||||
)
|
||||
go_maze(
|
||||
start.x,
|
||||
@ -24,6 +25,6 @@ function mz_square(rows, columns, start = [0, 0], init_cells, x_wrapping = false
|
||||
len(mz[0]),
|
||||
x_wrapping,
|
||||
y_wrapping,
|
||||
function(x, y, cells, seed) rand_dirs(x, y, cells, seed),
|
||||
directions,
|
||||
seed
|
||||
);
|
||||
|
@ -17,6 +17,7 @@ function mz_square_cells(rows, columns, start = [0, 0], init_cells, x_wrapping =
|
||||
mz = init_undef ? mz_square_initialize(rows, columns) : init_cells,
|
||||
r = len(mz),
|
||||
c = len(mz[0]),
|
||||
directions = function(x, y, cells, seed) rand_dirs(x, y, cells, seed),
|
||||
generated = go_maze(
|
||||
start.x,
|
||||
start.y,
|
||||
@ -24,7 +25,7 @@ function mz_square_cells(rows, columns, start = [0, 0], init_cells, x_wrapping =
|
||||
r, c,
|
||||
x_wrapping,
|
||||
y_wrapping,
|
||||
function(x, y, cells, seed) rand_dirs(x, y, cells, seed),
|
||||
directions,
|
||||
seed
|
||||
)
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user