(add-record-to-result {:keys [games-won games-lost games-tied] :as result})Adds a record string to a result
Adds a record string to a result
(add-result-against-teams-with-same-record result
all-results
all-teams
all-games)Adds a Result map against teams that have the same record. This is UPA tiebreaking rule 2: Won-loss records, counting only games between the teams that are tied.
Adds a Result map against teams that have the same record. This is UPA tiebreaking rule 2: Won-loss records, counting only games between the teams that are tied.
(event->tiebreaking-method event)Returns the tiebreaking method for an event.
Returns the tiebreaking method for an event.
(games->results teams games)Returns a list of Results for the given teams + games.
Returns a list of Results for the given teams + games.
(games->sorted-results teams games)(games->sorted-results teams games tiebreak-method)Returns a sorted list of Results for the given teams + games.
Returns a sorted list of Results for the given teams + games.
(group->placements event group-id)Returns the places decided by a Group's placement games, sorted by place. A placement game carries result-place-for-winner and / or result-place-for-loser. Each place looks like: {:place 1, :team-id "team-xxx", :team-name "Foo", :game-id "game-xxx", :decided? true} {:place 3, :team-id nil, :team-name nil, :game-id "game-yyy", :decided? false} A place is undecided when its game is not STATUS_FINAL or ended in a tie. Unlike group->sorted-results, this works for a bracket that is partially played. Returns an empty vector when no game in the Group has placements (ie: a round robin pool).
Returns the places decided by a Group's placement games, sorted by place.
A placement game carries result-place-for-winner and / or result-place-for-loser.
Each place looks like:
{:place 1, :team-id "team-xxx", :team-name "Foo", :game-id "game-xxx", :decided? true}
{:place 3, :team-id nil, :team-name nil, :game-id "game-yyy", :decided? false}
A place is undecided when its game is not STATUS_FINAL or ended in a tie.
Unlike group->sorted-results, this works for a bracket that is partially played.
Returns an empty vector when no game in the Group has placements (ie: a round robin pool).Returns the sorted results for a Game Group. All of the games in the group must be STATUS_FINAL. Returns nil otherwise
Returns the sorted results for a Game Group. All of the games in the group must be STATUS_FINAL. Returns nil otherwise
(group->tiebreaking-method event group-id)Returns the tiebreaking method for a Group.
Returns the tiebreaking method for a Group.
(results->duplicate-records results)Returns a Set of the duplicate records in a collection of results. ie: which records need tiebreaking logic applied
Returns a Set of the duplicate records in a collection of results. ie: which records need tiebreaking logic applied
(team->streak event team-id)Returns the current streak for a team across its STATUS_FINAL games in an Event, in timeslot order. {:outcome :win, :count 3} means the team has won its last three games. :outcome is :win, :loss, or :tie. Returns nil when the team has not finished any games.
Returns the current streak for a team across its STATUS_FINAL games in an Event,
in timeslot order. {:outcome :win, :count 3} means the team has won its last three
games. :outcome is :win, :loss, or :tie.
Returns nil when the team has not finished any games.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 |