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

JudoContesttype

The state of a contest: who is on the mat, what has been scored, and the clock.

Import it

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

Definition

interface JudoContest {
    white: JudoAthlete;
    blue: JudoAthlete;
    sides?: readonly [
        JudoSide,
        JudoSide
    ];
    clock?: number | string;
    goldenScore?: boolean;
    osaekomi?: {
        side: 0 | 1;
        seconds: number;
    };
    weight?: string;
    round?: string;
    mat?: string | number;
    contest?: string | number;
    finished?: boolean;
    method?: JudoMethod;
    winner?: 0 | 1;
    hansokuMake?: 0 | 1;
}

Members

NameTypeDescription
whiteJudoAthlete
blueJudoAthlete
sides (optional)readonly [JudoSide, JudoSide] | undefined

What each side has scored, white first. Left out, nothing yet.

clock (optional)string | number | undefined

The contest clock as it is shown: seconds (222) or "3:42".

goldenScore (optional)boolean | undefined

The contest is in golden score.

osaekomi (optional){ side: 0 | 1; seconds: number; } | undefined

An osaekomi in progress: the side holding (0 white, 1 blue) and the seconds so far (0 to 20; 5 is yuko, 10 waza-ari, 20 ippon).

weight (optional)string | undefined

The weight class as a heading (judoCategoryLabel), the round ("Final", roundName), the mat (1, shown as "Mat 1") and the contest number ("G-24").

round (optional)string | undefined
mat (optional)string | number | undefined
contest (optional)string | number | undefined
finished (optional)boolean | undefined

The contest is over: a lead on the scores then wins by decision. An ippon, waza-ari-awasete-ippon, hansoku-make, fusen-gachi or kiken-gachi ends it by itself.

method (optional)JudoMethod | undefined

How it ended, for what the scores cannot say (see JudoResult.method), and who won a default (0 white, 1 blue).

winner (optional)0 | 1 | undefined
hansokuMake (optional)0 | 1 | undefined

A direct hansoku-make: the side (0 white, 1 blue) that was given it.

Examples

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

const contest: JudoContest = {
  white: { name: "Daiki Hoshino", code: "JPN" },
  blue: { name: "Mathis Roussel", code: "FRA" },
  sides: [{ wazaAri: 1, shido: 1 }, { yuko: 2, shido: 2 }],
  clock: "2:14",
  weight: "Men -66 kg",
  round: "Final",
};
console.log(judoScoreboard(contest).includes("2:14"));
true

What it prints (run when this page was built)

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