Skip to the content

Toranpuトランプ

Use a deck, play eleven games with computers, solve a solitaire, or display cards in your own design.

Toranpu is Japanese for playing cards. About the name

Contents

Reference · Klondike

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

NameTypeDescription
codestring

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)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/toranpu 2.15.0.