encodeGamefunction
Encodes canonical settings, accepted tick-stamped actions and a verified replay checkpoint.
Import it
import { encodeGame } from "@johnmorrisdotca/houseki/magnetic-blocks";
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 settings, accepted tick-stamped actions and a verified replay checkpoint.
Examples
import { createGame, encodeGame } from "@johnmorrisdotca/houseki/magnetic-blocks";
const state=createGame({seed:"docs"});
console.log(encodeGame(state).length);12118What it prints (run when this page was built)