Input/Output tools, most of the game wants a io-handler function, see default-io-handler
for an example
Input/Output tools, most of the game wants a io-handler function, see [[default-io-handler]] for an example
(default-io-handler
{player-index :active-player players :players :as gamestate})
An example of how to interface with the library. Check what the gamestate
is :awaiting
, get what actions you can do with get-actions
then perform the corresponding action via perform-action
.
An example of how to interface with the library. Check what the `gamestate` is `:awaiting`, get what actions you can do with [[get-actions]] then perform the corresponding action via [[perform-action]].
(get-actions {awaiting :awaiting
player-index :active-player
discard :discard
knocking-player :knocking-player
:as gamestate})
Returns a vec of actions you can take in the current gamestate. Use perform-action
to do the action
Returns a vec of actions you can take in the current gamestate. Use [[perform-action]] to do the action
(perform-action {awaiting :awaiting
player-index :active-player
discard :discard
knocking-player :knocking-player
:as gamestate}
action-index)
Performs the action cooresponding to the index in the vec given by get-actions
Performs the action cooresponding to the index in the vec given by [[get-actions]]
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close