SUIT_DISPLAYconstant
How each suit is written and drawn: its symbol, its name and its colour.
Import it
import { SUIT_DISPLAY } from "@johnmorrisdotca/toranpu/deck";
Definition
const SUIT_DISPLAY: Record<Suit, SuitDisplay> = {
spades: { symbol: "♠", name: "spades", colour: "black" },
hearts: { symbol: "♥", name: "hearts", colour: "red" },
diamonds: { symbol: "♦", name: "diamonds", colour: "red" },
clubs: { symbol: "♣", name: "clubs", colour: "black" },
}
Members
| Name | Type | Description |
|---|---|---|
spades | SuitDisplay | |
hearts | SuitDisplay | |
diamonds | SuitDisplay | |
clubs | SuitDisplay |
Examples
import { SUIT_DISPLAY } from "@johnmorrisdotca/toranpu/deck";
console.log(SUIT_DISPLAY);{
spades: { symbol: '♠', name: 'spades', colour: 'black' },
hearts: { symbol: '♥', name: 'hearts', colour: 'red' },
diamonds: { symbol: '♦', name: 'diamonds', colour: 'red' },
clubs: { symbol: '♣', name: 'clubs', colour: 'black' }
}What it prints (run when this page was built)