Interface LoadableTournamentValues

Properties of tournaments to be loaded with Manager.reloadTournament

The only difference from TournamentValues is that matches and players are arrays of MatchValues and PlayerValues, respectively, as opposed to arrays of the classes.

See TournamentValues for detailed descriptions of properties.

interface LoadableTournamentValues {
    colored: boolean;
    id: string;
    matches: MatchValues[];
    meta: {
        [key: string]: any;
    };
    name: string;
    players: PlayerValues[];
    round: number;
    scoring: {
        bestOf: number;
        bye: number;
        draw: number;
        loss: number;
        tiebreaks: (
            | "median buchholz"
            | "solkoff"
            | "sonneborn berger"
            | "cumulative"
            | "versus"
            | "game win percentage"
            | "opponent game win percentage"
            | "opponent match win percentage"
            | "opponent opponent match win percentage")[];
        win: number;
    };
    sorting: "none" | "ascending" | "descending";
    stageOne: {
        consolation: boolean;
        format:
            | "single-elimination"
            | "double-elimination"
            | "stepladder"
            | "swiss"
            | "round-robin"
            | "double-round-robin";
        initialRound: number;
        maxPlayers: number;
        rounds: number;
    };
    stageTwo: {
        advance: {
            method: "points" | "rank" | "all";
            value: number;
        };
        consolation: boolean;
        format: "single-elimination" | "double-elimination" | "stepladder";
    };
    status:
        | "setup"
        | "stage-one"
        | "stage-two"
        | "complete";
}

Hierarchy

Properties

colored: boolean

If the order of players in matches matters. Used in tournaments that require color balance.

Initialized as false

id: string

Unique ID of the tournament.

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

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

Initialized as {}

name: string

Name of the tournament.

players: PlayerValues[]
round: number

Current round of the tournament.

Initialized as 0

scoring: {
    bestOf: number;
    bye: number;
    draw: number;
    loss: number;
    tiebreaks: (
        | "median buchholz"
        | "solkoff"
        | "sonneborn berger"
        | "cumulative"
        | "versus"
        | "game win percentage"
        | "opponent game win percentage"
        | "opponent match win percentage"
        | "opponent opponent match win percentage")[];
    win: number;
}

Details about scoring, including point values for all outcomes and a sorted list of tiebreakers.

Initialized as:

{
bestOf: 1,
win: 1,
draw: 0.5,
loss: 0,
bye: 1,
tiebreaks: []
}

Type declaration

  • bestOf: number

    Number of possible games. Used to determine number of wins in a bye.

  • bye: number

    Points awarded for receiving a bye.

  • draw: number

    Points awarded for drawing a match.

  • loss: number

    Points awarded for losing a match.

  • tiebreaks: (
        | "median buchholz"
        | "solkoff"
        | "sonneborn berger"
        | "cumulative"
        | "versus"
        | "game win percentage"
        | "opponent game win percentage"
        | "opponent match win percentage"
        | "opponent opponent match win percentage")[]

    Array of tiebreakers being used.

  • win: number

    Points awarded for winning a match.

sorting: "none" | "ascending" | "descending"

Method of sorting players, if they are rated/seeded.

Initialized as 'none'

stageOne: {
    consolation: boolean;
    format:
        | "single-elimination"
        | "double-elimination"
        | "stepladder"
        | "swiss"
        | "round-robin"
        | "double-round-robin";
    initialRound: number;
    maxPlayers: number;
    rounds: number;
}

Details about the first stage of the tournament.

Initialized as:

{
format: 'single-elimination',
consolation: false,
rounds: 0,
initialRound: 1,
maxPlayers: 0
}

Type declaration

  • consolation: boolean

    If there is a third place match for single elimination.

  • format:
        | "single-elimination"
        | "double-elimination"
        | "stepladder"
        | "swiss"
        | "round-robin"
        | "double-round-robin"

    Format for the first stage.

  • initialRound: number

    Number of the first round.

  • maxPlayers: number

    Maximum number of players who can be enrolled. There is no maximum if this is zero.

  • rounds: number

    Number of rounds in the first stage.

stageTwo: {
    advance: {
        method: "points" | "rank" | "all";
        value: number;
    };
    consolation: boolean;
    format: "single-elimination" | "double-elimination" | "stepladder";
}

Details about the second stage of the tournament.

Initialized as:

{
format: null,
consolation: false,
advance: {
value: 0,
method: 'all'
}
}

Type declaration

  • advance: {
        method: "points" | "rank" | "all";
        value: number;
    }

    Determines how players advance from stage one to stage two.

    • method: "points" | "rank" | "all"

      The type of value to use if players advance.

    • value: number

      The breakpoint value for advancing players (greater than or equal to if method: 'points' and less than or equal to if method: 'rank').

  • consolation: boolean

    If there is a third place match for single elimination.

  • format: "single-elimination" | "double-elimination" | "stepladder"

    Format for the second stage. If null, then there is no stage two.

status:
    | "setup"
    | "stage-one"
    | "stage-two"
    | "complete"

Current state of the tournament.

Initialized as 'setup'