GameEventtype
What a move made happen, for a host to draw or sound.
Import it
import type { GameEvent } from "@johnmorrisdotca/houseki/tsumiki";
Definition
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;
};
Examples
import type { GameEvent } from "@johnmorrisdotca/houseki/tsumiki";
const value: GameEvent = { kind: "lines", rows: [0], columns: [], points: 10 };
console.log(value.kind);linesWhat it prints (run when this page was built)