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

encodeMovesfunction

A list of moves written as text, one after another with nothing between.

Import it

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

Definition

function encodeMoves(moves: readonly FreeCellMove[]): string

Parameters

NameTypeDescription
movesreadonly FreeCellMove[]

The ordered native moves to replay.

Returns

string

A list of moves written as text, one after another with nothing between.

Examples

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

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

What it prints (run when this page was built)

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