Interface PlayerValues

Properties of players

interface PlayerValues {
    active: boolean;
    id: string;
    matches: {
        bye: boolean;
        color: "w" | "b";
        draw: number;
        id: string;
        loss: number;
        opponent: string;
        pairUpDown: boolean;
        win: number;
    }[];
    meta: {
        [key: string]: any;
    };
    name: string;
    value: number;
}

Properties

active: boolean

If the player is active in the tournament.

Initialized as true

id: string

Unique identifier of the player.

matches: {
    bye: boolean;
    color: "w" | "b";
    draw: number;
    id: string;
    loss: number;
    opponent: string;
    pairUpDown: boolean;
    win: number;
}[]

Array of matches that the player is involved in.

Initialized as []

Type declaration

  • bye: boolean

    If the match is a bye.

  • color: "w" | "b"

    If the player is player one ('w') or player two ('b') in the match (used in Swiss pairings if colored: true).

  • draw: number

    Number of draws in the match.

  • id: string

    The ID of the match.

  • loss: number

    Number of losses for the player in the match.

  • opponent: string

    The ID of the opponent (or null if no opponent).

  • pairUpDown: boolean

    If the opponent has a different point total before the match (used in Swiss pairings).

  • win: number

    Number of wins for the player in the match.

meta: {
    [key: string]: any;
}

Object for storing any additional information, useful for implementations of the library.

Initialized as {}

name: string

Name of the player.

value: number

A value used for seeding players, such as rank or rating.

Initialized as 0