(go game-state)
(go game-state direction)
Change the location if direction is valid.
Change the location if direction is valid.
(go-back game-state)
Go to the previous room, if possible.
Go to the previous room, if possible.
(inventory game-state)
Describe the inventory contents.
Describe the inventory contents.
(look game-state)
Look around (describe room) and enumerate available movement directions.
Look around (describe room) and enumerate available movement directions.
(look-to game-state)
(look-to game-state direction)
Describe what's in the given direction.
Describe what's in the given direction.
(make-compound-item-handler verb-name verb-kw)
(make-compound-item-handler verb-name
verb-kw
handler
&
{:keys [kw-required] :or {kw-required true}})
The same as above but adapted to compund verbs.
The same as above but adapted to compund verbs.
(make-item-handler verb-name verb-kw)
(make-item-handler verb-name
verb-kw
handler
&
{:keys [kw-required] :or {kw-required true}})
Takes the verb name, the kw to look up at the item at the handler function, wraps the function with the common logic such as trying to find the item, executing pre/post conditions, etc.
Takes the verb name, the kw to look up at the item at the handler function, wraps the function with the common logic such as trying to find the item, executing pre/post conditions, etc.
(restore game-state)
Restore a previous game state from file.
Restore a previous game state from file.
(save game-state)
Save the current game state to a file.
Save the current game state to a file.
(take-all game-state)
Go through every item in the room that defines a value for :take, and attempt to take it.
Go through every item in the room that defines a value for :take, and attempt to take it.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close