MatchResult型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Public outcome recorded when a match ends.
インポート
import type { MatchResult } from "@johnmorrisdotca/gunjin";
定義
type MatchResult = {
winner: Player | null;
reason: "objective-captured" | "capture-threshold" | "blocked" | "flag-won" | "flag-held" | "resigned" | "agreed-draw" | "repetition";
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
winner | Player | null | |
reason | "objective-captured" | "capture-threshold" | "blocked" | "flag-won" | "flag-held" | "resigned" | "agreed-draw" | "repetition" |
例
import type { MatchResult } from "@johnmorrisdotca/gunjin";
const value: MatchResult = {winner:null,reason:"agreed-draw"};
console.log(value);{ winner: null, reason: 'agreed-draw' }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。