ChallengeSettingstype
The fixed Falling Triplets challenge settings with the original board and finite triplet queue.
Import it
import type { ChallengeSettings } from "@johnmorrisdotca/houseki/falling-triplets";
Definition
interface ChallengeSettings extends Settings {
readonly mode: 'challenge';
readonly goal: ChallengeGoal['type'];
readonly challengeBoard: readonly (Gem | null)[];
readonly challengeQueue: readonly Triplet[];
}
Members
| Name | Type | Description |
|---|---|---|
mode | "challenge" | |
goal | "targets" | "chain" | "empty" | |
challengeBoard | readonly (Gem | null)[] | |
challengeQueue | readonly Triplet[] | |
width | number | |
height | number | |
colourCount | 4 | 5 | 6 | |
seed | string | |
pieceLimit (optional) | number | undefined | |
targetIds (optional) | readonly number[] | undefined | |
minimumChain (optional) | number | undefined | |
witness (optional) | readonly ChallengeHint[] | undefined |
Examples
import { createGame } from "@johnmorrisdotca/houseki/falling-triplets";
import type { ChallengeSettings } from "@johnmorrisdotca/houseki/falling-triplets";
const state=createGame({seed:"docs"});
const value: ChallengeSettings = {...state.settings,mode:"challenge",goal:"empty",challengeBoard:state.board,challengeQueue:[["red","green","blue"]]};
console.log(value == null ? value : typeof value === "object" ? Object.keys(value).slice(0,6) : value);[ 'mode', 'width', 'height', 'colourCount', 'seed', 'goal' ]What it prints (run when this page was built)