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 · Cards, hands and piles

PileLayoutOptionstype

How a pile is laid out.

Import it

import type { PileLayoutOptions } from "@johnmorrisdotca/toranpu/element";

Also exported from: @johnmorrisdotca/toranpu/element/define

Definition

type PileLayoutOptions = {
    messiness?: number;
    seed?: number;
    depth?: number;
};

Members

NameTypeDescription
messiness (optional)number | undefined

From 0 (squared up neatly) to 1 (very messy). Unless said, 0.3.

seed (optional)number | undefined

The pile's own seed: the same seed always lays the same pile the same way. Unless said, 1.

depth (optional)number | undefined

How many cards under the top one are drawn at most, so a pile of fifty-two costs no more than one of ten. Unless said, 10.

Examples

import type { PileLayoutOptions } from "@johnmorrisdotca/toranpu/element";

const value: PileLayoutOptions = { seed: 42, depth: 10, messiness: 0.5 };
console.log(value.seed);
42

What it prints (run when this page was built)

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