encodeGamefunction
Encodes canonical initial settings, accepted ordinal actions and a derived checkpoint.
Import it
import { encodeGame } from "@johnmorrisdotca/houseki/colour-chains";
Definition
function encodeGame(state: GameState): string
Parameters
| Name | Type | Description |
|---|---|---|
state | GameState | The immutable native state to read or transition; the input is retained. |
Returns
string
Encodes canonical initial settings, accepted ordinal actions and a derived checkpoint.
Examples
import { createGame, encodeGame } from "@johnmorrisdotca/houseki/colour-chains";
const state=createGame({seed:"docs"});
console.log(encodeGame(state).length);1324What it prints (run when this page was built)