Anonymous user
Hilbert curve: Difference between revisions
m
→{{header|Lua}}
m (→{{header|Lua}}) |
m (→{{header|Lua}}) |
||
Line 429:
-- Or the characters for ASCII line drawing
function charor(c1, c2)
local bits={
local bits={ [" "]=0x0, ["┌"]=0x3, ["│"]=0x5, ["└"]=0x6, ["├"]=0x7, ["┐"]=0x9, ▼
[" "]=0x0,
▲
local char={" ", "╷", "╶", "┌", "╵", "│", "└", "├", "╴", "┐", "─", "┬", "┘", "┤", "┴", "┼",}
local b1,b2=bits[c1] or 0,bits[c2] or 0
|