encodeGamefunction
Encodes the authoritative settings, action recording, and derived checkpoint.
Import it
import { encodeGame } from "@johnmorrisdotca/houseki/falling-triplets";
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 the authoritative settings, action recording, and derived checkpoint.
Examples
import { createGame, encodeGame } from "@johnmorrisdotca/houseki/falling-triplets";
const state=createGame({seed:"docs"});
console.log(encodeGame(state).length);1504What it prints (run when this page was built)