Builds and edits the gamestate
Builds and edits the gamestate
(add-player gamestate player-name)Adds a player to the gamestate
Adds a player to the gamestate
(deal gamestate)Deals 3 cards to each player, then one to :discard
Deals 3 cards to each player, then one to `:discard`
(dec-life gamestate player-index)Subtracts a life from the player at player-index
Subtracts a life from the player at `player-index`
(discard gamestate player-index card-index)Removes the card at card-index from the hand of the player at player-index, sets the gamestate's :discard to that card
Removes the card at `card-index` from the hand of the player at `player-index`, sets the `gamestate`'s `:discard` to that card
(draw-from-deck gamestate player-index)Adds the first card in the :deck to the hand of the player at player-index
Adds the first card in the `:deck` to the hand of the player at `player-index`
(draw-from-discard gamestate player-index)Adds the card from :discard to the hand of the player at player-index
Adds the card from `:discard` to the hand of the player at `player-index`
(empty-hands gamestate)(empty-hands gamestate player-index)Removes all cards from each :player's hand
Removes all cards from each `:player`'s hand
(knock gamestate player-index)Sets the gamestate's :knocking-player to player-index
Sets the `gamestate`'s `:knocking-player` to `player-index`
(new-gamestate)Creates the basic skeleton of the gamestate, including a shuffled deck
Creates the basic skeleton of the gamestate, including a shuffled deck
(new-round gamestate)Shuffles a new deck, removes players who are no longer in the game, then deals
Shuffles a new deck, removes players who are no longer in the game, then deals
(next-player gamestate)Updates :active-player to the next index (or 0 if at end)
Updates `:active-player` to the next index (or 0 if at end)
(score gamestate)Removes a point from any player for whom [[ev/player-loses-life?]] is true
Removes a point from any player for whom [[ev/player-loses-life?]] is `true`
(update-all-hand-points gamestate)(update-all-hand-points gamestate player-index)Updates :hand-points for all players
Updates `:hand-points` for all players
(update-hand-points gamestate player-index)Updates the player at player-index's :hand-points
Updates the player at `player-index`'s `:hand-points`
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |