encodeGamefunction
A game as text: what it was and the moves made, never the score or the board, which a replay works out.
Import it
import { encodeGame } from "@johnmorrisdotca/houseki/tsumiki";
Definition
function encodeGame(state: GameState): string
Parameters
| Name | Type | Description |
|---|---|---|
state | GameState | The game to keep. |
Returns
string
Text that decodeGame reads back to this state.
Examples
import { createGame, encodeGame } from "@johnmorrisdotca/houseki/tsumiki";
console.log(encodeGame(createGame({ seed: "demo" })).length > 0);trueWhat it prints (run when this page was built)