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

decodeMovesfunction

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

Import it

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

Definition

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

Parameters

NameTypeDescription
codestring

The encoded card or game state.

Returns

SpiderMove[] | null

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

Examples

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

console.log(decodeMoves(encodeMoves([{ kind: "deal" }])));
[ { kind: 'deal' } ]

What it prints (run when this page was built)

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