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 · Colour Chains

actionsForTickfunction

Resolves this tick's inputs in lateral, rotation, drop, soft-drop, pause order.

Import it

import { actionsForTick } from "@johnmorrisdotca/houseki/colour-chains";

Definition

function actionsForTick(game: GameState, input: InputSchedulerState): readonly [readonly Action[], InputSchedulerState]

Parameters

NameTypeDescription
gameGameState

The native game state used to resolve scheduled input.

inputInputSchedulerState

The held-input scheduler state for this logical tick.

Returns

readonly [readonly PlayAction[], InputSchedulerState]

Resolves this tick's inputs in lateral, rotation, drop, soft-drop, pause order.

Examples

import { actionsForTick, createGame, createInputScheduler } from "@johnmorrisdotca/houseki/colour-chains";

const state=createGame({seed:"docs"});
const input=createInputScheduler();
console.log(actionsForTick(state,input)[0]);
[]

What it prints (run when this page was built)

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