Skip to the content

Jarajaraジャラジャラ

Draw mahjong tiles, arrange racks and stacked boards, and play seeded Awase alone or at a shared table.

Jarajara is the Japanese sound of mahjong tiles rattling together. About the name

Contents

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

NameTypeDescription
codesIterable<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"]));
123m

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/jarajara 1.7.0.