aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.lisp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.lisp b/src/main.lisp
index 53d9bec..e92b6ad 100644
--- a/src/main.lisp
+++ b/src/main.lisp
@@ -50,10 +50,13 @@
(fn read-until-valid-integers () (-> nil list)
(let ((inp (remove-duplicates (read-integers))))
- (while (not (every #'is-valid-hand-index inp))
+ (while (not (and (every #'is-valid-hand-index inp)
+ (< (length inp) 5)
+ (>= (length inp) 0)))
(format t "Need at most 5 integers between 0 and 4...~%")
(force-output)
- (setq inp (remove-duplicates (read-integers))))))
+ (setq inp (remove-duplicates (read-integers))))
+ inp))
(defun generate-hand ()
(->> (make-deck)