本文へ移動

Taisen Brackets対戦

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

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

目次

リファレンス · トーナメント表・表・決勝までの道を描く

JudoContest型

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

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

インポート

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

定義

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;
}

メンバー

名前型説明
whiteJudoAthlete
blueJudoAthlete
sides (省略可)readonly [JudoSide, JudoSide] | undefined

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

clock (省略可)string | number | undefined

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

goldenScore (省略可)boolean | undefined

The contest is in golden score.

osaekomi (省略可){ 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 (省略可)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 (省略可)string | undefined
mat (省略可)string | number | undefined
contest (省略可)string | number | undefined
finished (省略可)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 (省略可)JudoMethod | undefined

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

winner (省略可)0 | 1 | undefined
hansokuMake (省略可)0 | 1 | undefined

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

例

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

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

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

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