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

GroupRowtype

One team's line of a group's table.

Import it

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

Definition

interface GroupRow {
    team: Team;
    played: number;
    won: number;
    drawn: number;
    lost: number;
    goalsFor: number;
    goalsAgainst: number;
    diff: number;
    points: number;
}

Members

NameTypeDescription
teamTeam
playednumber
wonnumber
drawnnumber
lostnumber
goalsFornumber
goalsAgainstnumber
diffnumber

Goals for minus goals against.

pointsnumber

Three for a win, one for a draw.

Examples

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

const teams = [{ id: "A", name: "Aurora", group: "A" }, { id: "B", name: "Harbour", group: "A" }];
const [group] = groupStandings({ teams, matchups: [{ sides: ["A", "B"], score: [2, 1], round: 0 }] });
const top: GroupRow = group.rows[0];
console.log(top.team.name, top.points, top.diff);
Aurora 3 1

What it prints (run when this page was built)

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