aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.lisp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main.lisp b/src/main.lisp
index 8b8aabb..d8985d0 100644
--- a/src/main.lisp
+++ b/src/main.lisp
@@ -51,16 +51,16 @@
(fn read-until-valid-integers () (-> nil list)
(let ((inp (remove-duplicates (read-integers))))
(while (not (and (every #'is-valid-hand-index inp)
- (< (length inp) 5)
+ (<= (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))))
inp))
-(fn read-and-confirm-valid-integers (hand) (-> nil list)
+(fn read-and-confirm-valid-integers (hand) (-> (cardset) list)
(let ((confirm nil)
- inp)
+ (inp nil))
(while (null confirm)
(setq inp (read-until-valid-integers))
(if (null inp)
@@ -69,7 +69,7 @@
:collect (nth index hand))
cardset->str
(format t "To redeal: ~a~%")))
- (setq confirm (y-or-n-p "Confirm: ")))
+ (setq confirm (y-or-n-p "Confirm:")))
inp))
(defun print-hand (hand)
@@ -99,6 +99,7 @@
(read-redeal-print nil))
(format t "Cards remaining: {~a}
-Final hand: [~a]"
+Final hand: [~a]
+"
(cardset->str rest)
(cardset->str final-hand))))