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 · Card backs

SUIT_PATHSconstant

The four suits, each a path in a box of 100 filled in one colour. A club is three lobes and a stem, a spade a heart turned over with a stem, so the four are told apart by their outline alone.

Import it

import { SUIT_PATHS } from "@johnmorrisdotca/toranpu/card-backs";

Definition

const SUIT_PATHS: Readonly<Record<CardSuitLetter, string>> = {
    S: "M50 6C42 22 10 38 10 60C10 73 20 81 31 81C39 81 45 77 48 71C47 82 43 89 34 95H66C57 89 53 82 52 71C55 77 61 81 69 81C80 81 90 73 90 60C90 38 58 22 50 6Z",
    H: "M50 90C28 72 7 55 7 33C7 18 18 8 31 8C40 8 46 13 50 21C54 13 60 8 69 8C82 8 93 18 93 33C93 55 72 72 50 90Z",
    D: "M50 4Q67 28 86 50Q67 72 50 96Q33 72 14 50Q33 28 50 4Z",
    C: "M33 30a17 17 0 1 0 34 0a17 17 0 1 0 -34 0ZM10 60a17 17 0 1 0 34 0a17 17 0 1 0 -34 0ZM56 60a17 17 0 1 0 34 0a17 17 0 1 0 -34 0ZM44 40L42 62H58L56 40ZM48 62C47 80 43 89 34 95H66C57 89 53 80 52 62Z",
}

Members

NameTypeDescription
Sstring
Hstring
Dstring
Cstring

Examples

import { SUIT_PATHS } from "@johnmorrisdotca/toranpu/card-backs";
console.log(Object.keys(SUIT_PATHS));
[ 'S', 'H', 'D', 'C' ]

What it prints (run when this page was built)

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