encodeStackUpfunction
A game of Stack Up as text: its table, its seed and its moves, never a hand.
Import it
import { encodeStackUp } from "@johnmorrisdotca/toranpu/stack-up";
Definition
function encodeStackUp(game: StackUpGame): string
Parameters
| Name | Type | Description |
|---|---|---|
game | StackUpGame | The current native game; applying a move returns a new state. |
Returns
string
A game of Stack Up as text.
Examples
import { encodeStackUp, startStackUp } from "@johnmorrisdotca/toranpu/stack-up";
console.log(encodeStackUp(startStackUp(15, ["Aki", "Ben"], undefined, 42)!).length > 0);trueWhat it prints (run when this page was built)