Reference · Game engine and table
hitotsuWordsfunction
"red five", "blue draw two", "wild draw four", as a sentence and a screen reader say it; in Japanese, "赤の5", "青のドロー2", "ワイルドドローフォー".
Import it
import { hitotsuWords } from "@johnmorrisdotca/hitotsu";
Definition
function hitotsuWords(card: HitotsuCard, language?: "en" | "ja"): string
Parameters
| Name | Type | Description |
|---|---|---|
card | string | The physical card id; null draws the back where supported. |
language (optional) | "en" | "ja" | English or Japanese for the displayed words. |
Returns
string
"red five", "blue draw two", "wild draw four", as a sentence and a screen reader say it; in Japanese, "赤の5", "青のドロー2", "ワイルドドローフォー".
Examples
import { hitotsuWords } from "@johnmorrisdotca/hitotsu";
console.log(hitotsuWords("R70", "en"));red sevenWhat it prints (run when this page was built)