Reference · Game engine and table
hitotsuCardShapesfunction
The shapes of one card, in drawing order: a face, or the back for null.
called marks a wild on the pile with the colour it called.
Import it
import { hitotsuCardShapes } from "@johnmorrisdotca/hitotsu";
Definition
function hitotsuCardShapes(card: HitotsuCard | null, called?: HitotsuColour): HitotsuShape[]
Parameters
| Name | Type | Description |
|---|---|---|
card | string | null | The physical card id; null draws the back where supported. |
called (optional) | HitotsuColour | undefined | The colour called by a wild card on the pile. |
Returns
HitotsuShape[]
The shapes of one card, in drawing order: a face, or the back for null. called marks a wild on the pile with the colour it called.
Examples
import { hitotsuCardShapes } from "@johnmorrisdotca/hitotsu";
console.log(hitotsuCardShapes("R70").map((shape) => shape.kind));[
'rect', 'rect',
'rect', 'text',
'text', 'text',
'text', 'text'
]What it prints (run when this page was built)