Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

4 of 6
saved 2 bytes
Arnauld
  • 205.5k
  • 21
  • 187
  • 670

JavaScript (ES8), 173 bytes

Expects an array of characters and returns a matrix of characters.

a=>a.map(c=>~a?1/c?m[y][x]=" ░▒▓█"[c]||a:c<{}?a=c>"!"?-1:m[y][x]:c>"s"?y-=!!y:c>"d"?y+=y<24:x+=c>"a"?x<79:-!!x:a=c,m=[...1e9+{}].map(_=>[..."".padEnd(80)]),x=y=0)&&m

Try it online!

Arnauld
  • 205.5k
  • 21
  • 187
  • 670

AltStyle によって変換されたページ (->オリジナル) /