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

CardPlacetype

One card's place: across and down in card widths from where the first lies, and its turn in degrees.

Import it

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

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

Definition

type CardPlace = {
    x: number;
    y: number;
    rotate: number;
};

Members

NameTypeDescription
xnumber
ynumber
rotatenumber

Examples

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

const value: CardPlace = handLayout(1)[0]!;
console.log(value);
{ x: 0, y: 0, rotate: 0 }

What it prints (run when this page was built)

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