Create a new tournament.
Unique ID of the tournament
Name of the tournament
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
Clears the results of a match.
Throws an error if no match has the ID specified or if the match is still active.
In elimination and stepladder formats, it reverses the progression of players in the bracket.
The ID of the match
Array of matches that were updated
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
Ends the tournament and marks all players and matches as inactive.
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
Array of matches that were updated
An array of currently active matches
An array of currently active players
ID of the tournament
An array of matches in the tournament
Round number
An array of matches with the corresponding round number
Name of the tournament
Throws an error if no player is found
ID of the player
The player with the corresponding ID
An array of players in the tournament
Current round number of the tournament
An object with 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.
If order of players in matches matters
Sorting method, if players are rated/seeded
An object with 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.
Computes tiebreakers for all players, using only the games from stage one, and ranks the players by points and tiebreakers.
A sorted array of players with scores and tiebreaker values
An object with 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.
Computes tiebreakers for all players and ranks the players by points and tiebreakers.
A sorted array of players with scores and tiebreaker values
Current state of the tournament
The values of the tournament details
If the current format is an elimination format
Progress to the next round in the tournament.
Throws an error if there are active matches, if the current format is elimination or stepladder, or when attempting to create matches for stage two and there are an insufficient number of players.
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
Set tournament options (only changes in options need to be included in the object)
Start the tournament.
Throws an error if there are an insufficient number of players (4 if double elimination, otherwise 2).
Class representing a tournament.
See TournamentValues for detailed descriptions of properties.