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

followsfunction

Whether upper may lie on lower in a column: one lower, of the other colour.

Import it

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

Definition

function follows(lower: number, upper: number): boolean

Parameters

NameTypeDescription
lowernumber

The inclusive lower bound.

uppernumber

The inclusive upper bound.

Returns

boolean

Whether upper may lie on lower in a column: one lower, of the other colour.

Examples

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

console.log(follows(16, 4));
false

What it prints (run when this page was built)

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