Liking cljdoc? Tell your friends :D

thirty-one.io

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
raw docstring

default-io-handlerclj

(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]].
sourceraw docstring

get-actionsclj

(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
sourceraw docstring

perform-actionclj

(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]]
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close