repl.it
@jrunning/

ScalyZigzagPupa

Ruby

No description

fork
loading
Files
  • main.rb
main.rb
1
2
3
4
5
6
7
8
9
10
11
fn=
->a,*r{q=(0..z=127).map{|i|"%3d|"%(z-i)+" "*1e4}
a.zip(*r){|n,v,o,f|q[z-n][o+4]="O=#[email protected]+0*"[v/16]*(f-o)}
q}

puts fn[
  [60, 48, 62, 47, 64, 45,  65,  43, 67, 41, 65, 43, 64, 45,  62, 47, 60, 48],
  [63, 31, 75, 90, 12, 23, 122, 104, 33, 19, 57, 42,  5, 82, 109, 86, 95, 71],
  [ 0,  0,  2,  2,  4,  4,   6,   6,  8,  8, 10, 10, 12, 12,  14, 14, 16, 16],
  [ 2,  2,  4,  4,  6,  6,   8,   8, 10, 10, 12, 12, 14, 14,  16, 16, 18, 18]
]
ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]