本文へ移動

Taisen Brackets対戦

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

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

目次

リファレンス · リーグごとの形式

PlayoffFormat型

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

A league's playoff format in one era: the years it ran, its rounds, how many teams it took, its byes and its sources.

インポート

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

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

定義

interface PlayoffFormat {
    league: League;
    year: number;
    from: number;
    to: number | null;
    label: string;
    rounds: PlayoffRound[];
    teams: number | null;
    byes: number;
    groups: readonly [
        string,
        string
    ] | null;
    note?: string;
    emblem: string;
    sources: readonly string[];
}

メンバー

名前型説明
leagueLeague
yearnumber

The season (or edition) this was asked for.

fromnumber

The first and last year of the era this entry covers; to is null while it is current.

tonumber | null
labelstring

The era in a few words.

roundsPlayoffRound[]

The rounds, first round first.

teamsnumber | null

How many teams start the bracket, or null where it varies.

byesnumber

The number of teams of each half that skip the first round.

groupsreadonly [string, string] | null

The names of the two halves, left first, or null where the bracket is not split in two.

note (省略可)string | undefined
emblemstring

The league's default emblem id (LEAGUE_EMBLEMS), for trophy with an emblems renderer.

sourcesreadonly string[]

The English Wikipedia articles this entry was checked against (CC BY-SA 4.0; only facts are used).

例

import { playoffFormat, type PlayoffFormat } from "@johnmorrisdotca/taisen-brackets";

const format: PlayoffFormat | null = playoffFormat("nhl", 2024);
console.log(format?.label, format?.rounds.length);
16 teams, eight a conference, division rounds first 4

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

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

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