updated Janet port to use string/check-set for choices

This commit is contained in:
Luxferre
2026-03-31 20:28:47 +03:00
parent 587801bb59
commit b7ddaf3c17
+2 -2
View File
@@ -32,7 +32,7 @@
(var valid false) (var valid false)
(while (not valid) (while (not valid)
(set resp (get-choice prompt)) (set resp (get-choice prompt))
(set valid (case resp "y" true "n" true false))) (set valid (string/check-set "yn" resp)))
(= resp "y")) (= resp "y"))
# data section # data section
@@ -86,7 +86,7 @@
(set valid (cond (set valid (cond
(= ch "r") (= ch "r")
(and (state :can-run) (not (state :engaged))) (and (state :can-run) (not (state :engaged)))
(has-value? ["1" "2" "3" "4"] ch) (string/check-set "1234" ch)
(<= (scan-number ch) (length room)) (<= (scan-number ch) (length room))
false))) false)))
ch) ch)