GameEvent型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What a move made happen, for a host to draw or sound.
インポート
import type { GameEvent } from "@johnmorrisdotca/houseki/tsumiki";
定義
type GameEvent = {
readonly kind: "placed";
readonly cells: readonly number[];
} | {
readonly kind: "lines";
readonly rows: readonly number[];
readonly columns: readonly number[];
readonly points: number;
} | {
readonly kind: "dealt";
} | {
readonly kind: "ended";
readonly phase: GamePhase;
};
例
import type { GameEvent } from "@johnmorrisdotca/houseki/tsumiki";
const value: GameEvent = { kind: "lines", rows: [0], columns: [], points: 10 };
console.log(value.kind);lines出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。