-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I think it would be as simple as just replacing the if-else block and using something like
partials = (
FULL_BLOCK,
LEFT_SEVEN_EIGHTHS_BLOCK,
LEFT_THREE_QUARTERS_BLOCK,
LEFT_HALF_BLOCK,
LEFT_FIVE_EIGHTHS_BLOCK,
LEFT_THREE_EIGHTHS_BLOCK,
LEFT_ONE_QUARTER_BLOCK,
LEFT_ONE_EIGHTH_BLOCK,
' ',
)
...
width = (right(inner_area) - left(inner_area) + 1)
for y in top(inner_area):bottom(inner_area)
for x in left(inner_area):right(inner_area)
symbol = clamp(round(Int, (x - r * width) * 8), 0, 8) + 1
set(buf, x, y, crayon, partials[symbol])
end
end
Would also make the output more copy friendly.
Metadata
Metadata
Assignees
Labels
No labels