GameSettingstype
How a game was set up, the whole of what a replay needs but the moves.
Import it
import type { GameSettings } from "@johnmorrisdotca/houseki/tsumiki";
Definition
interface GameSettings {
readonly mode: GameMode;
readonly seed: string;
readonly width: number;
readonly height: number;
readonly dailyDate?: string;
readonly challengeId?: string;
readonly goal?: ChallengeGoal;
readonly stones?: readonly number[];
}
Members
| Name | Type | Description |
|---|---|---|
mode | GameMode | |
seed | string | |
width | number | |
height | number | |
dailyDate (optional) | string | undefined | |
challengeId (optional) | string | undefined | |
goal (optional) | ChallengeGoal | undefined | |
stones (optional) | readonly number[] | undefined | The stones a challenge starts with, as cell indices. |
Examples
import { createGame } from "@johnmorrisdotca/houseki/tsumiki";
import type { GameSettings } from "@johnmorrisdotca/houseki/tsumiki";
const value: GameSettings = createGame({ seed: "demo" }).settings;
console.log(value.mode);relaxedWhat it prints (run when this page was built)