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 · Deck tools

isWholeDeckfunction

Whether a string is a whole deck: fifty-two cards, each exactly once.

Import it

import { isWholeDeck } from "@johnmorrisdotca/toranpu/deck";

Definition

function isWholeDeck(text: string): boolean

Parameters

NameTypeDescription
textstring

The notation, encoded state or saved text to read.

Returns

boolean

Whether a string is a whole deck: fifty-two cards, each exactly once.

Examples

import { freshDeck, isWholeDeck, writeCards } from "@johnmorrisdotca/toranpu/deck";

console.log(isWholeDeck(writeCards(freshDeck())));
true

What it prints (run when this page was built)

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