runLengthfunction
How many cards on top of a column are in order, each on the one under it: the most a single carry could ever take.
Import it
import { runLength } from "@johnmorrisdotca/toranpu/freecell";
Definition
function runLength(column: readonly number[]): number
Parameters
| Name | Type | Description |
|---|---|---|
column | readonly number[] | The column index, or its bottom-to-top cards where an array is accepted. |
Returns
number
How many cards on top of a column are in order, each on the one under it: the most a single carry could ever take.
Examples
import { runLength } from "@johnmorrisdotca/toranpu/freecell";
console.log(runLength([4, 16]));2What it prints (run when this page was built)