Matchup型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One tie: two sides and who went through. Everything but sides is optional, so that a bracket can be drawn from
what is known (the sides of a first round, a few results) and fill in as the games are played.
インポート
import type { Matchup } from "@johnmorrisdotca/taisen-brackets/layout";
ほかのエクスポート元: @johnmorrisdotca/taisen-brackets
定義
interface Matchup {
id?: string;
sides: readonly [
SideId | Team | null,
SideId | Team | null
];
winner?: SideId | null;
round?: number;
date?: string;
no?: number;
feeds?: readonly [
Feed | null,
Feed | null
];
kind?: MatchupKind;
bestOf?: number;
games?: readonly Game[];
legs?: readonly Game[];
score?: readonly [
number,
number
];
pens?: readonly [
number,
number
];
extraTime?: boolean;
walkover?: boolean;
third?: boolean;
stage?: "play-in" | "repechage" | "bronze";
judo?: JudoResult;
home?: 0 | 1;
note?: string;
seeds?: readonly [
string | number | null,
string | number | null
];
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
id (省略可) | string | undefined | Names the tie for |
sides | readonly [Team | SideId | null, Team | SideId | null] | The two sides: a team's |
winner (省略可) | SideId | null | undefined | The side that went through, by id. Left out, it is worked out from the games when they settle it. |
round (省略可) | number | undefined | The round, from 1 (the first of the tree) to the final. |
date (省略可) | string | undefined | A sortable date ( |
no (省略可) | number | undefined | A number that orders the ties of a round before the date does (a World Cup's match numbers). |
feeds (省略可) | readonly [Feed | null, Feed | null] | undefined | Which ties feed this one: |
kind (省略可) | MatchupKind | undefined | How the tie is contested. Left out: replay if a game replays, series if there is a |
bestOf (省略可) | number | undefined | The length of the series (7 for a best-of-seven). |
games (省略可) | readonly Game[] | undefined | The games, oldest first. |
legs (省略可) | readonly Game[] | undefined | The legs of an aggregate tie: the same as |
score (省略可) | readonly [number, number] | undefined | The result, without the games: the score of a game, the games won of a series ( |
pens (省略可) | readonly [number, number] | undefined | The shoot-out of a game with no |
extraTime (省略可) | boolean | undefined | The game with no |
walkover (省略可) | boolean | undefined | The tie was settled without a game (a side withdrew): the note says so. |
third (省略可) | boolean | undefined | This is the third-place match: it leads nowhere and is drawn apart. |
stage (省略可) | "play-in" | "repechage" | "bronze" | undefined |
|
judo (省略可) | JudoResult | undefined | A judo contest's scores: ippon, waza-ari, yuko, shido, hansoku-make, golden score and time. The first side is white, the second blue. The score, the winner and the notes come from it; see |
home (省略可) | 0 | 1 | undefined | The side playing at home (0 or 1), for the |
note (省略可) | string | undefined | |
seeds (省略可) | readonly [string | number | null, string | number | null] | undefined | The seed tags of the two sides for this tie ( |
例
import { drawBracket, type Matchup } from "@johnmorrisdotca/taisen-brackets";
const final: Matchup = { id: "final", sides: ["ARG", "FRA"], score: [3, 3], extraTime: true, pens: [4, 2], date: "2022-12-18" };
console.log(drawBracket([final]).startsWith("<svg"));true出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。