statusOffunction
Derive the native phase, score, legal-move count, tools and goal/timer progress for host labels.
Import it
import { statusOf } from "@johnmorrisdotca/houseki/gem-swap";
Definition
function statusOf(state: GameState): GameStatus
Parameters
| Name | Type | Description |
|---|---|---|
state | GameState | The immutable native state to read or transition; the input is retained. |
Returns
GameStatus
Derive the native phase, score, legal-move count, tools and goal/timer progress for host labels.
Examples
import { createGame, statusOf } from "@johnmorrisdotca/houseki/gem-swap";
const state=createGame({seed:"docs"});
console.log(statusOf(state).phase);readyWhat it prints (run when this page was built)