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

judoOutcomefunction

Checks a result against the rules and works out who won and how. winner is the winner the matchup names (needed for fusen-gachi and kiken-gachi, which no score can show). Throws a RangeError for a count out of range, two ippon, a method the scores contradict, or a default with no winner.

Import it

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

Definition

function judoOutcome(result: JudoResult, winner?: 0 | 1 | null): JudoOutcome

Parameters

NameTypeDescription
resultJudoResult

The scores and, optionally, the method, the golden score and the time.

winner (optional)0 | 1 | null

Who won, when the scores do not say (a decision by the referees, a withdrawal): 0 or 1.

Returns

JudoOutcome

The outcome: the winner (null when there is none yet), the method, the points, the time and whether golden score was played.

Examples

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

const o = judoOutcome({ sides: [{ yuko: 2 }, { wazaAri: 1, shido: 1 }], time: "4:00" });
console.log(o.winner, o.method, o.points.join(" "));
1 score 2 10

What it prints (run when this page was built)

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