mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-10 00:36:40 +02:00
refactor
This commit is contained in:
@@ -26,12 +26,11 @@ function mz_hamiltonian(rows, columns, start = [0, 0], seed) =
|
||||
let(
|
||||
x = mz_square_get(cell, "x"),
|
||||
y = mz_square_get(cell, "y"),
|
||||
type = mz_square_get(cell, "t"),
|
||||
pts = type == "TOP_WALL" ? _mz_hamiltonian_top(x, y) :
|
||||
type == "RIGHT_WALL" ? _mz_hamiltonian_right(x, y) :
|
||||
type == "TOP_RIGHT_WALL" ? _mz_hamiltonian_top_right(x, y) : []
|
||||
type = mz_square_get(cell, "t")
|
||||
)
|
||||
each pts
|
||||
each if(type == "TOP_WALL") _mz_hamiltonian_top(x, y) else
|
||||
if(type == "RIGHT_WALL") _mz_hamiltonian_right(x, y) else
|
||||
if(type == "TOP_RIGHT_WALL") _mz_hamiltonian_top_right(x, y)
|
||||
],
|
||||
[for(x = [0:columns * 2 - 1]) [x, 0]],
|
||||
[for(y = [0:rows * 2 - 1]) [0, y]]
|
||||
|
Reference in New Issue
Block a user