本文へ移動

Taisen Brackets対戦

対戦の一覧から、トーナメント表をSVGで描きます。

対戦(たいせん)は、二者が向かい合って勝負することです。 名前について(英語)

目次

リファレンス · 各対戦の位置を計算

JudoResult型

リファレンスの説明と例は英語です。見出しと目次は日本語です。

The result of one judo contest, the sides in the order of the matchup's sides: the first is white, the second blue.

インポート

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

ほかのエクスポート元: @johnmorrisdotca/taisen-brackets

定義

interface JudoResult {
    sides: readonly [
        JudoSide,
        JudoSide
    ];
    method?: JudoMethod;
    hansokuMake?: 0 | 1;
    goldenScore?: boolean;
    time?: number | string;
}

メンバー

名前型説明
sidesreadonly [JudoSide, JudoSide]
method (省略可)JudoMethod | undefined

How it was won. Left out, it is worked out from the scores; fusen-gachi and kiken-gachi (no score can say so) need the matchup's winner.

hansokuMake (省略可)0 | 1 | undefined

The side (0 or 1) that was given a direct hansoku-make (a grave infringement): the other side wins by ippon.

goldenScore (省略可)boolean | undefined

The contest went on to golden score, and the scores are the ones at its end.

time (省略可)string | number | undefined

The contest time: seconds (222) or "3:42". Regular time is 4 minutes; golden score runs past it.

例

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

const result: JudoResult = { sides: [{ yuko: 2 }, { wazaAri: 1, shido: 1 }], goldenScore: false, time: "4:00" };
console.log(judoOutcome(result).method);
score

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/taisen-brackets 0.20.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。