(create-games-from-template division-id
group-id
teams
fields
rounds
games-template)creates games from a Games Template
creates games from a Games Template
(game->losing-team-id {:keys [scoreA scoreB teamA-id teamB-id] :as game})returns the losing team-id from a game if it is final and one team has scored less points than the otherwise nil otherwise (including ties)
returns the losing team-id from a game if it is final and one team has scored less points than the otherwise nil otherwise (including ties)
(game->winning-team-id {:keys [scoreA scoreB teamA-id teamB-id] :as game})returns the winning team-id from a game if it is final and one team has scored more points than the other nil otherwise (including ties)
returns the winning team-id from a game if it is final and one team has scored more points than the other nil otherwise (including ties)
(game? g)Does g look like a Game? A loose check used to recognize Games when walking an Event; it accepts Games with pending teams. See valid-game? for a strict check.
Does g look like a Game? A loose check used to recognize Games when walking an Event; it accepts Games with pending teams. See valid-game? for a strict check.
(games->counts games)Returns how many games have been played. games may be a map or a list. {:total 30, :final 9, :remaining 21} :final is the number of STATUS_FINAL games; :remaining is every other status (scheduled, in progress, canceled, etc).
Returns how many games have been played. games may be a map or a list.
{:total 30, :final 9, :remaining 21}
:final is the number of STATUS_FINAL games; :remaining is every other status
(scheduled, in progress, canceled, etc).(games->games-list games)Converts games into a list or throws if unable to do so
Converts games into a list or throws if unable to do so
(get-games-played-between-two-teams games teamA-id teamB-id)Returns a hash map of the games played between two teams.
games can either be a list or a map
Returns a hash map of the games played between two teams. games can either be a list or a map
(reset-game g)Resets the values of a Game for a new Event.
Resets the values of a Game for a new Event.
(valid-game? g)Is g a well-formed Game? Checks every field, so a Game with pending teams (nil teamA-id / teamB-id) is not valid. See game? to recognize Games inside an Event.
Is g a well-formed Game? Checks every field, so a Game with pending teams (nil teamA-id / teamB-id) is not valid. See game? to recognize Games inside an Event.
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 |