aboutsummaryrefslogtreecommitdiff
path: root/src/main.lisp
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2025-02-14 23:26:06 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2025-02-14 23:26:06 +0000
commit350221cfb0019d03b3ad4d78c9c443f890080c03 (patch)
tree333dcac529c29e59b0d7da2622a014312d5890e8 /src/main.lisp
parentbf6cace5c355441247b973dcd6ba93c70cc0fa61 (diff)
downloadcantedraw-350221cfb0019d03b3ad4d78c9c443f890080c03.tar.gz
cantedraw-350221cfb0019d03b3ad4d78c9c443f890080c03.tar.bz2
cantedraw-350221cfb0019d03b3ad4d78c9c443f890080c03.zip
Fix problem with alexandria:shuffle not being truly random
Due to the way random works, we need to see it on each run of the binary - thus need to make a new random state.
Diffstat (limited to 'src/main.lisp')
-rw-r--r--src/main.lisp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main.lisp b/src/main.lisp
index e92b6ad..422beab 100644
--- a/src/main.lisp
+++ b/src/main.lisp
@@ -64,6 +64,7 @@
(split 5)))
(defun start ()
+ (setf *random-state* (make-random-state t))
(destructuring-bind (hand . rest) (generate-hand)
(declare (ignore rest))
(->> hand cardset->str (format t "Hand=[~a]~%"))