Jump to content

Munching squares: Difference between revisions

no edit summary
(→‎{{header|MiniScript}}: simplified for modern Mini Micro)
No edit summary
Line 753:
}
//--------------------------------------------------------------------------------------------------
</syntaxhighlight>
 
=={{header|Clojure}}==
The fun part of munching squares isn't color tables, it's watching them munch:
 
<syntaxhighlight lang="clojure">(let [n 16]
(loop [i 0]
(print "\033[0;0f\033[2J")
(doseq [y (range n)]
(doseq [x (range n)]
(print (if (< (bit-xor x y) i) "█" " ")))
(print "\n"))
(flush)
(Thread/sleep 150)
(recur (mod (inc i) (inc n)))))
</syntaxhighlight>
 
13

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.