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
| Name | Type | Description |
|---|---|---|
game | GameState | The native game state used to resolve scheduled input. |
input | InputSchedulerState | 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)