Module:MOS in EDO: Difference between revisions

Ganaram inukshuk (talk | contribs)
Removed unused param from step visualization function
Ganaram inukshuk (talk | contribs)
Added support for size-0 steps to step vis function
Line 160: Line 160:
local right_border = "┤"
local right_border = "┤"
local no_border = "─"
local no_border = "─"
local double_border = "╫"
local single_border = "┼"
local single_border = "┼"
Line 166: Line 167:
-- For each step size of k, print a single border, followed by k-1 no-border symbols
-- For each step size of k, print a single border, followed by k-1 no-border symbols
-- If this is the first step, print the left border instead
-- If this is the first step, print the left border instead
-- If the step size is 0, print a double border only
-- If this is the last step, add a right border after the entire sequence
-- If this is the last step, add a right border after the entire sequence
for i = 1, #step_pattern do
for i = 1, #step_pattern do
Line 174: Line 176:
current_step_vis = left_border .. string.rep(no_border, current_step_size - 1)
current_step_vis = left_border .. string.rep(no_border, current_step_size - 1)
else
else
current_step_vis = single_border .. string.rep(no_border, current_step_size - 1)
if current_step_size == 0 then
current_step_vis = double_border
else
current_step_vis = single_border .. string.rep(no_border, current_step_size - 1)
end
end
end