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
| Name | Type | Description |
|---|---|---|
column | SpiderColumn | 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] }));3What it prints (run when this page was built)