legalActionsfunction
Lists the core actions currently available to the player.
Import it
import { legalActions } from "@johnmorrisdotca/houseki/falling-triplets";
Definition
function legalActions(state: GameState): readonly Action[]
Parameters
| Name | Type | Description |
|---|---|---|
state | GameState | The immutable native state to read or transition; the input is retained. |
Returns
readonly Action[]
Lists the core actions currently available to the player.
Examples
import { createGame, legalActions } from "@johnmorrisdotca/houseki/falling-triplets";
const state=createGame({seed:"docs"});
console.log(legalActions(state).length);6What it prints (run when this page was built)