Reference · Tiles, layouts and deals
writeNotationfunction
Tiles written the way hands are: digits then a suit letter, 123m456p789s1112z. Runs of one suit share its
letter. Anything that is no tile is left out. readNotation is its inverse.
Import it
import { writeNotation } from "@johnmorrisdotca/jarajara";
Definition
function writeNotation(codes: Iterable<string>): string
Parameters
| Name | Type | Description |
|---|---|---|
codes | Iterable<string> | The tile face codes in current order. |
Returns
string
Tiles written the way hands are: digits then a suit letter, 123m456p789s1112z. Runs of one suit share its letter. Anything that is no tile is left out. readNotation is its inverse.
Examples
import { writeNotation } from "@johnmorrisdotca/jarajara";
console.log(writeNotation(["a","b","c"]));123mWhat it prints (run when this page was built)