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

JudoAthletetype

One athlete on the scoreboard. Only name is needed.

Import it

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

Definition

interface JudoAthlete {
    name: string;
    code?: string;
    flag?: string;
    mark?: string;
    coach?: string;
}

Members

NameTypeDescription
namestring
code (optional)string | undefined

The country's three letters (JPN), written big under the name. Left out, nothing is written.

flag (optional)string | undefined

A country code for the flags renderer (jp, GB-ENG: Hata's round flags are one line). With none, the flag is the code (or the initials) on a tile.

mark (optional)string | undefined

A mark of your own (an image address or inline SVG) in place of a flag.

coach (optional)string | undefined

The coach's name, written small under the code when coaches is on.

Examples

import { judoScoreboard, type JudoAthlete } from "@johnmorrisdotca/taisen-brackets";

const white: JudoAthlete = { name: "Daiki Hoshino", code: "JPN", flag: "JP", coach: "A. Sato" };
console.log(judoScoreboard({ white, blue: { name: "Mathis Roussel", code: "FRA" } }).includes("Hoshino"));
true

What it prints (run when this page was built)

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