Munching squares: Difference between revisions
Content added Content deleted
(→{{header|MiniScript}}: simplified for modern Mini Micro) |
TechAscent (talk | contribs) No edit summary |
||
Line 753: | 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> |
</syntaxhighlight> |
||