Skip to the content

Houseki宝石

Run five native gem and stone engines, play measured challenges and lessons, and save deterministic games.

Houseki (宝石) is Japanese for a gem or precious stone. About the name

Contents

Reference · Falling Triplets

createChallengefunction

Creates a challenge after validating its authored board, finite queue, goal, and witness.

Import it

import { createChallenge } from "@johnmorrisdotca/houseki/falling-triplets";

Definition

function createChallenge(options: ChallengeOptions): GameState

Parameters

NameTypeDescription
optionsChallengeOptions

Validated native creation, authored challenge, or environment options described by this signature.

Returns

GameState

Creates a challenge after validating its authored board, finite queue, goal, and witness.

Examples

import { createChallenge } from "@johnmorrisdotca/houseki/falling-triplets";

console.log(createChallenge({width:6,height:12,board:Array(72).fill(null),queue:[["red","green","blue"],["blue","red","green"]],goal:{type:"empty"}}).phase);
falling

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/houseki 0.4.2.