Skip to the content

Taisen Brackets対戦

Knockout brackets as SVG, from a list of ties.

Taisen (対戦, たいせん) is Japanese for a matchup: two sides facing each other. About the name

Contents

Reference · Where every tie sits

GamesOptionstype

How the games of a flat list are grouped into ties: the stages in order, which one is the third-place match, which are two legs, and how long each series is.

Import it

import type { GamesOptions } from "@johnmorrisdotca/taisen-brackets/layout";

Also exported from: @johnmorrisdotca/taisen-brackets

Definition

interface GamesOptions {
    stages: readonly string[];
    third?: string;
    aggregate?: readonly string[];
    series?: Readonly<Record<string, number>>;
}

Members

NameTypeDescription
stagesreadonly string[]

The knockout stages in order, first round first: ["round-of-16", "quarter-final", "semi-final", "final"].

third (optional)string | undefined

The stage of the third-place match, if the data has one.

aggregate (optional)readonly string[] | undefined

Stages played in two legs, added up. Several games of one pair in any other stage are a replay.

series (optional)Readonly<Record<string, number>> | undefined

Stages played as a series, with their length: { final: 7 }.

Examples

import { matchupsFromGames, type GamesOptions } from "@johnmorrisdotca/taisen-brackets";

const options: GamesOptions = { stages: ["Semi-final", "Final"], third: "Third place" };
console.log(options.stages.length);
2

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/taisen-brackets 0.20.0.