Reference · Rules, maps and records
encodeTenkafunction
A game as text to keep: its table and its moves.
Import it
import { encodeTenka } from "@johnmorrisdotca/tenka";
Definition
function encodeTenka(game: TenkaGame): string
Parameters
| Name | Type | Description |
|---|---|---|
game | TenkaGame | The current native game state. |
Returns
string
A game as text to keep: its table and its moves.
Examples
import { encodeTenka, startTenka } from "@johnmorrisdotca/tenka";
const game = startTenka(10,["Seat 1","Seat 2"],42)!;
console.log(encodeTenka(game));{"v":2,"seed":42,"players":["Seat 1","Seat 2"],"rounds":10,"placing":"auto","moves":[]}What it prints (run when this page was built)