Reference · Game engine and table
colourOffunction
A card's colour, or null for a wild.
Import it
import { colourOf } from "@johnmorrisdotca/hitotsu";
Definition
function colourOf(card: HitotsuCard): HitotsuColour | null
Parameters
| Name | Type | Description |
|---|---|---|
card | string | The physical card id; null draws the back where supported. |
Returns
HitotsuColour | null
The card’s colour, or null for a wild card.
Examples
import { colourOf } from "@johnmorrisdotca/hitotsu";
console.log(colourOf("WW0"));nullWhat it prints (run when this page was built)