Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,12 @@
(loop [n 12]
(print (format "%s remain, take how many?\n> " n)) (flush)
(let [v (try (Long. (clojure.string/trim (read-line)))
(catch Exception _ 0))]
(if (#{1 2 3} v)
(do (println (format "You took %s, leaving %s, computer takes %s..."
v (- n v) (- 4 v)))
(if (= 4 n)
(println "Computer wins. 😐")
(recur (- n 4))))
(do (println "Please enter 1, 2, or 3...")
(recur n)))))