hintGamefunction
Returns a deterministic legal swap hint and permanently marks the run assisted.
Import it
import { hintGame } from "@johnmorrisdotca/houseki/gem-swap";
Definition
function hintGame(state: GameState): Transition
Parameters
| Name | Type | Description |
|---|---|---|
state | GameState | The immutable native state to read or transition; the input is retained. |
Returns
Transition
Returns a deterministic legal swap hint and permanently marks the run assisted.
Examples
import { createGame, hintGame } from "@johnmorrisdotca/houseki/gem-swap";
const state=createGame({seed:"docs"});
console.log(hintGame(state).accepted);trueWhat it prints (run when this page was built)