make world-sexp work
This commit is contained in:
parent
442dc8755b
commit
88cf2f8c38
|
@ -40,6 +40,7 @@
|
|||
#'(define-verbs in-verbs
|
||||
_verb-item ...)))
|
||||
|
||||
|
||||
(provide verb-item)
|
||||
(define-inverting #'(verb-item (_name0 _transitive0?) (_name _transitive?) ... _desc)
|
||||
#`[_name0 #,@(if (syntax->datum #'_transitive0?) #'(_) #'()) (= _name ...) _desc])
|
||||
|
@ -95,6 +96,16 @@
|
|||
[#'(_ _sx) #'_sx])
|
||||
|
||||
|
||||
;; todo: consolidate the game-starters.
|
||||
;; `start-game-at` works with s-exp language,
|
||||
;; `start-section` works with text lang.
|
||||
(provide start-game-at)
|
||||
(define #'(start-game-at _where)
|
||||
(inject-syntax ([#'in-verbs (shared-syntax 'in-verbs)])
|
||||
#'(init-game _where
|
||||
in-verbs
|
||||
everywhere-actions)))
|
||||
|
||||
(provide start-section)
|
||||
(define #'(start-section _heading _where)
|
||||
(inject-syntax ([#'in-verbs (shared-syntax 'in-verbs)])
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;; Verbs ----------------------------------------
|
||||
|
||||
;; This declaration must be first:
|
||||
(define-verbs all-verbs
|
||||
(define-verbs in-verbs
|
||||
[north (= n) "go north"]
|
||||
[south (= s) "go south"]
|
||||
[east (= e) "go east"]
|
||||
|
@ -97,4 +97,4 @@
|
|||
;; Starting place ----------------------------------
|
||||
|
||||
;; The module must end with the starting place name:
|
||||
meadow
|
||||
(start-game-at meadow)
|
||||
|
|
Loading…
Reference in New Issue
Block a user