updated Janet port to use string/check-set for choices
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
(var valid false)
|
||||
(while (not valid)
|
||||
(set resp (get-choice prompt))
|
||||
(set valid (case resp "y" true "n" true false)))
|
||||
(set valid (string/check-set "yn" resp)))
|
||||
(= resp "y"))
|
||||
|
||||
# data section
|
||||
@@ -86,7 +86,7 @@
|
||||
(set valid (cond
|
||||
(= ch "r")
|
||||
(and (state :can-run) (not (state :engaged)))
|
||||
(has-value? ["1" "2" "3" "4"] ch)
|
||||
(string/check-set "1234" ch)
|
||||
(<= (scan-number ch) (length room))
|
||||
false)))
|
||||
ch)
|
||||
|
||||
Reference in New Issue
Block a user