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 · The road to the final

RoadTotalstype

The numbers behind a road chart.

Import it

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

Also exported from: @johnmorrisdotca/taisen-brackets

Definition

interface RoadTotals {
    finalists: [
        RoadRecord,
        RoadRecord
    ];
    rounds: string[];
    played: boolean;
    champion: string | null;
}

Members

NameTypeDescription
finalists[RoadRecord, RoadRecord]
roundsstring[]

The rounds of the chart, the earliest first, as keys.

playedboolean

The final has a score.

championstring | null

The winner of the final, or null when it has not been played or is level.

Examples

import { roadToFinal, type RoadTotals } from "@johnmorrisdotca/taisen-brackets";

const totals: RoadTotals = roadToFinal([{ name: "Owls", path: [] }, { name: "Gulls", path: [] }]).totals;
console.log(totals.played, totals.champion);
false null

What it prints (run when this page was built)

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