If the player is active
Unique ID of the player
Array of matches the player is in
If the match is a bye.
If the player is player one ('w'
) or player two ('b'
) in the match (used in Swiss pairings if colored: true
).
Number of draws in the match.
The ID of the match.
Number of losses for the player in the match.
The ID of the opponent (or null
if no opponent).
If the opponent has a different point total before the match (used in Swiss pairings).
Number of wins for the player in the match.
Any extra information
Name of the player
Numerical value for player, such as rating or seed
Set information about the player (only changes in information need to be included in the object).
Adds a match to the player's record.
Throws an error if attempting to duplicate a match.
Object with match details
Optional
bye?: booleanOptional
color?: "w" | "b"Optional
draw?: numberOptional
loss?: numberOptional
pairOptional
win?: numberUpdates the details of a match.
Throws an error if the match doesn't exist in the player's records.
Only needs to contain properties that are being changed.
The ID of the match
The match details being changed
Optional
bye?: booleanOptional
color?: "w" | "b"Optional
draw?: numberOptional
loss?: numberOptional
opponent?: stringOptional
pairOptional
win?: number
Class representing a player
See PlayerValues for detailed descriptions of properties.