decodeMovesfunction
A move list read back, or null for one with a character that is no move.
Import it
import { decodeMoves } from "@johnmorrisdotca/toranpu/klondike";
Definition
function decodeMoves(code: string): KlondikeMove[] | null
Parameters
| Name | Type | Description |
|---|---|---|
code | string | The encoded card or game state. |
Returns
KlondikeMove[] | null
A move list read back, or null for one with a character that is no move.
Examples
import { decodeMoves, encodeMoves } from "@johnmorrisdotca/toranpu/klondike";
console.log(decodeMoves(encodeMoves([{ kind: "draw" }])));[ { kind: 'draw' } ]What it prints (run when this page was built)