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 · Draw a bracket, a table or a road to the final

GroupTabletype

One group: its name in the language and its teams, the best first.

Import it

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

Definition

interface GroupTable {
    key: string;
    name: string;
    rows: GroupRow[];
}

Members

NameTypeDescription
keystring

The group's key: the teams' group, or a letter made for a group the teams do not name.

namestring

"Group A" in the language, or the teams' own group where it is a name and not a letter.

rowsGroupRow[]

Examples

import { groupStandings, type GroupTable } from "@johnmorrisdotca/taisen-brackets";

const teams = [{ id: "A", name: "Aurora", group: "A" }, { id: "B", name: "Harbour", group: "A" }];
const tables: GroupTable[] = groupStandings({ teams, matchups: [{ sides: ["A", "B"], score: [2, 1], round: 0 }] });
console.log(tables[0].name, tables[0].rows.length);
Group A 2

What it prints (run when this page was built)

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