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

RoadRecordtype

One finalist's record on the way.

Import it

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

Also exported from: @johnmorrisdotca/taisen-brackets

Definition

interface RoadRecord {
    name: string;
    matches: number;
    won: number;
    drawn: number;
    lost: number;
    scored: number;
    conceded: number;
}

Members

NameTypeDescription
namestring
matchesnumber

Matches played in the group and the knockout rounds (not the final), and how many it won, drew and lost.

wonnumber
drawnnumber
lostnumber
scorednumber

The goals it scored and let in over the matches whose score is a pair of numbers.

concedednumber

Examples

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

const chart = roadToFinal([{ name: "Owls", path: [{ round: "semi-final", opponent: { name: "Stars" }, score: [2, 0] }] }, { name: "Gulls", path: [] }]);
const owls: RoadRecord = chart.totals.finalists[0];
console.log(owls.matches, owls.won, owls.scored);
1 1 2

What it prints (run when this page was built)

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