From 921e67f5118a4ccaf36ed699adc47c7b2c4cfc8f Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Wed, 4 Sep 2019 08:23:25 +0800 Subject: [PATCH] refactor --- examples/stereographic_hex_maze.scad | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/stereographic_hex_maze.scad b/examples/stereographic_hex_maze.scad index 4deb38fe..01cbf0d6 100644 --- a/examples/stereographic_hex_maze.scad +++ b/examples/stereographic_hex_maze.scad @@ -37,18 +37,18 @@ module build_hex_maze(y_cells, x_cells, maze_vector, cell_radius, wall_thickness module build_cell(x, y, wall_type) { module build_right_wall(x_cell) { - up_right_wall(); if(x_cell % 2 != 0) { down_right_wall(); } + else { + up_right_wall(); + } } module build_row_wall(x_cell, y_cell) { if(x_cell % 2 != 0) { up_right_wall(); - if(y_cell == y_cells - 1) { - up_left_wall(); - } + up_left_wall(); } else { down_right_wall();