statusOffunction
Returns a plain status summary suitable for UI labels.
Import it
import { statusOf } from "@johnmorrisdotca/houseki/falling-triplets";
Definition
function statusOf(state: GameState): Readonly<{ phase: GameState["phase"]; score: number; maxChain: number; reason?: string; }>
Parameters
| Name | Type | Description |
|---|---|---|
state | GameState | The immutable native state to read or transition; the input is retained. |
Returns
Readonly<{ phase: GameState["phase"]; score: number; maxChain: number; reason?: string; }>
Returns a plain status summary suitable for UI labels.
Examples
import { createGame, statusOf } from "@johnmorrisdotca/houseki/falling-triplets";
const state=createGame({seed:"docs"});
console.log(statusOf(state).phase);fallingWhat it prints (run when this page was built)