Create a new tournament.
Unique ID of the tournament
Name of the tournament
If order of players in matches matters
Unique ID of the tournament
All matches of the tournament
Any extra information
Name of the tournament
All players in the tournament
Current round of the tournament
Details regarding scoring
Number of possible games. Used to determine number of wins in a bye.
Points awarded for receiving a bye.
Points awarded for drawing a match.
Points awarded for losing a match.
Array of tiebreakers being used.
Points awarded for winning a match.
Sorting method, if players are rated/seeded
Details regarding the tournament
If there is a third place match for single elimination.
Format for the first stage.
Number of the first round.
Maximum number of players who can be enrolled. There is no maximum if this is zero.
Number of rounds in the first stage.
Details regarding playoffs
Determines how players advance from stage one to stage two.
The type of value to use if players advance.
The breakpoint value for advancing players (greater than or equal to if method: 'points'
and less than or equal to if method: 'rank'
).
If there is a third place match for single elimination.
Format for the second stage. If null
, then there is no stage two.
Current state of the tournament
Set tournament options (only changes in options need to be included in the object)
Assigns a bye to a player in a specified round.
Throws an error if it is not actively Swiss pairings, no player has the ID specified, if the player is already inactive, or if the player already has a match in the round.
The ID of the player
The round number
Assigns a loss to a player in a specified round.
Throws an error if it is not actively Swiss pairings, no player has the ID specified, or if the player is already inactive.
If the player has a match in the specified round, it is removed, they are assigned a loss, and the opponent is assigned a bye.
The ID of the player
The round number
Create a new player.
Throws an error if ID is specified and already exists, if the specified maximum number of players has been reached, if the tournament is in stage one and not Swiss format, or if the tournament is in stage two or complete.
Alias of the player
ID of the player (randomly assigned if omitted)
The newly created player
Updates the result of a match.
Throws an error if no match has the ID specified or any player scores more than half the best of value
In elimination and stepladder formats, moves players to their appropriate next matches.
ID of the match
Number of wins for player one
Number of wins for player two
Number of draws
Remove a player.
Throws an error if no player has the ID specified or if the player is already inactive.
In active elimination and stepladder formats, adjusts paths for any matches that interact with the match the player is in.
In active round-robin formats, replaces the player in all future matches with a bye.
ID of the player
Computes tiebreakers for all players and ranks the players by points and tiebreakers.
If the array contains only active players
A sorted array of players with scores and tiebreaker values
Class representing a tournament.
See TournamentValues for detailed descriptions of properties.