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

freeCellStuckfunction

Whether nothing can be done but give up: no card can move anywhere.

Import it

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

Definition

function freeCellStuck(table: FreeCellTable): boolean

Parameters

NameTypeDescription
tableFreeCellTable

The native solitaire table; move helpers leave the input unchanged.

Returns

boolean

Whether nothing can be done but give up: no card can move anywhere.

Examples

import { dealFreeCell, dealOfSeed, deckOf, freeCellStuck } from "@johnmorrisdotca/toranpu/freecell";

const table = dealFreeCell(deckOf(dealOfSeed(42))!, 4);
console.log(freeCellStuck(table));
false

What it prints (run when this page was built)

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