Reference · Tiles, layouts and deals
findFacesfunction
Every tile a text names: the one face findFace finds, or, for the name of a group (winds, honours, circles), all of its faces.
Import it
import { findFaces } from "@johnmorrisdotca/jarajara";
Definition
function findFaces(text: string): MahjongFace[]
Parameters
| Name | Type | Description |
|---|---|---|
text | string | The unknown text or encoded record to interpret. |
Returns
MahjongFace[]
Every tile a text names: the one face findFace finds, or, for the name of a group (winds, honours, circles), all of its faces.
Examples
import { findFaces } from "@johnmorrisdotca/jarajara";
console.log(findFaces("dragons"));[
{ code: 'F', suit: 'dragons', rank: 1 },
{ code: 'G', suit: 'dragons', rank: 2 },
{ code: 'H', suit: 'dragons', rank: 3 }
]What it prints (run when this page was built)