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

setHeldActionfunction

Starts or releases one held action; opposite lateral holds cancel during scheduling.

Import it

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

Definition

function setHeldAction(state: InputSchedulerState, action: HoldAction, held: boolean): InputSchedulerState

Parameters

NameTypeDescription
stateInputSchedulerState

The immutable native state to read or transition; the input is retained.

actionHoldAction

One native action for this entry point; inspect accepted and reason on the result.

heldboolean

Whether this input is currently held.

Returns

InputSchedulerState

Starts or releases one held action; opposite lateral holds cancel during scheduling.

Examples

import { createInputScheduler, setHeldAction } from "@johnmorrisdotca/houseki/falling-triplets";

const input=createInputScheduler();
console.log(setHeldAction(input,"left",true));
{ held: { left: 0 }, queued: [] }

What it prints (run when this page was built)

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