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 · FreeCell

decodeMovesfunction

A move list read back, or null for one with a character that is no move.

Import it

import { decodeMoves } from "@johnmorrisdotca/toranpu/freecell";

Definition

function decodeMoves(code: string): FreeCellMove[] | null

Parameters

NameTypeDescription
codestring

The encoded card or game state.

Returns

FreeCellMove[] | null

A move list read back, or null for one with a character that is no move.

Examples

import { decodeMoves, encodeMoves } from "@johnmorrisdotca/toranpu/freecell";

console.log(decodeMoves(encodeMoves([{ from: "1", to: "a", count: 1 }])));
[ { from: '1', to: 'a', count: 1 } ]

What it prints (run when this page was built)

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