本文へ移動

Taisen Brackets対戦

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

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

目次

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

judoBracket関数

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

The contests of one judo weight category for any number of athletes, seeded in the standard way (the top seeds have the byes when the number is not a power of two). The athlete drawn first is white and the second blue (Matchup.sides: first white).

With repechage (IJF Sport and Organisation Rules, 2.5.2 "Quarter-final Repechage", the system of the Olympic Games): the athletes are in two tables and an elimination produces two finalists. "The athletes defeated in the quarter-final will compete in two (2) repechage contests. The winners of each of these two (2) repechage contests will compete in bronze medal contests against the loser of the semi-final contest of the respective opposite table. The winners (2) of those contests are placed third." The repechage and bronze contests are stage: "repechage" and stage: "bronze" matchups, fed by the losers of the tree's, and are drawn under it. Needs eight athletes or more. With direct, there are no such contests: the two losing semi-finalists are the bronze medallists (judoPodium).

Double repechage and full repechage (2.5.3 and 2.5.4) are not drawn: their pools are laid out in the rules' Appendix G charts.

インポート

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

定義

function judoBracket(athletes: readonly Team[], options?: JudoBracketOptions): { teams: Team[]; matchups: Matchup[]; }

引数

名前型説明
athletesreadonly Team[]

The athletes as teams, best seed first.

options (省略可)JudoBracketOptions

The system and a prefix for the ties' ids.

戻り値

{ teams: Team[]; matchups: Matchup[]; }

The athletes and the matchups, none played yet, ready for drawBracket.

例

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

const athletes = ["Haru", "Marc", "Levan", "Min", "Rafa", "Jasur", "Tom", "Joris"].map((name, i) => ({ id: name, name, seed: i + 1 }));
const { matchups } = judoBracket(athletes);
console.log(matchups.length, matchups.filter((m) => m.stage === "bronze").length);
11 2

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

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

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