diff --git a/src/maze/mz_wang_tiles.scad b/src/maze/mz_wang_tiles.scad index 8716fd5d..22527ed4 100644 --- a/src/maze/mz_wang_tiles.scad +++ b/src/maze/mz_wang_tiles.scad @@ -38,12 +38,12 @@ function mz_wang_tiles(cells, left_border = true, bottom_border = true) = bottom_border ? [for(x = [0:columns - 1]) [x * 2 + 1, 0]] : [ for(x = [0:columns - 1]) let(type = mz_square_get(top_cells[x], "t")) - if(type == "RIGHT_WALL" || type == "NO_WALL") [x * 2 + 1, 1] else [x * 2 + 1, 0] + [x * 2 + 1, type == "RIGHT_WALL" || type == "NO_WALL" ? 1 : 0] ], left_border ? [for(y = [0:rows - 1]) [0, y * 2 + 1]] : [ for(y = [0:rows - 1]) let(type = mz_square_get(right_cells[y], "t")) - if(type == "TOP_WALL" || type == "NO_WALL") [1, y * 2 + 1] else [0, y * 2 + 1] + [type == "TOP_WALL" || type == "NO_WALL" ? 1 : 0, y * 2 + 1] ] ), dot_pts = sort(hashset_elems(hashset(all, hash = function(p) _pt2_hash(p))), by = "vt")