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

runLengthfunction

How many cards on top of a column are one suit and in order, all face up: the most a carry can take.

Import it

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

Definition

function runLength(column: SpiderColumn): number

Parameters

NameTypeDescription
columnSpiderColumn

The column with its face-down count and bottom-to-top cards.

Returns

number

How many cards on top of a column are one suit and in order, all face up: the most a carry can take.

Examples

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

console.log(runLength({ down: 0, cards: [4, 3, 2] }));
3

What it prints (run when this page was built)

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