Hilbert curve: Difference between revisions
Content deleted Content added
I implemented repeated commands for line drawing, because that's just an additional line of code. |
|||
Line 430: | Line 430: | ||
function charor(c1, c2) |
function charor(c1, c2) |
||
local bits={ [" "]=0x0, ["┌"]=0x3, ["│"]=0x5, ["└"]=0x6, ["├"]=0x7, ["┐"]=0x9, |
local bits={ [" "]=0x0, ["┌"]=0x3, ["│"]=0x5, ["└"]=0x6, ["├"]=0x7, ["┐"]=0x9, |
||
["─"]=0xa, ["┬"]=0xb, ["┘"]=0xc, ["┤"]=0xd, ["┴"]=0xe, ["┼"]=0xf,} |
|||
local char={" ", " ", " ", "┌", " ", "│", "└", "├", " ", "┐", "─", "┬", "┘", "┤", "┴", "┼",} |
local char={" ", " ", " ", "┌", " ", "│", "└", "├", " ", "┐", "─", "┬", "┘", "┤", "┴", "┼",} |
||
local b1,b2=bits[c1] or 0,bits[c2] or 0 |
local b1,b2=bits[c1] or 0,bits[c2] or 0 |