Reference · Tiles, layouts and deals
tilesMatchfunction
Whether two tile face codes match under the selected bonus rule.
Import it
import { tilesMatch } from "@johnmorrisdotca/jarajara";
Definition
function tilesMatch(a: string, b: string, rule: MahjongBonusRule): boolean
Parameters
| Name | Type | Description |
|---|---|---|
a | string | The first tile slot or code specified by this signature. |
b | string | The second tile slot or code specified by this signature. |
rule | MahjongBonusRule | Grouped or identical bonus matching. |
Returns
boolean
Whether two tile face codes match under the selected bonus rule.
Examples
import { tilesMatch } from "@johnmorrisdotca/jarajara";
console.log(tilesMatch("I","J","group"));trueWhat it prints (run when this page was built)