updated Janet port to use string/check-set for choices
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user