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

MAHJONG_FACESconstant

The forty-two tile faces in stable code order, including bonus tiles.

Import it

import { MAHJONG_FACES } from "@johnmorrisdotca/jarajara";

Definition

const MAHJONG_FACES: readonly MahjongFace[] = (() => {
    const faces: MahjongFace[] = [];
    for (const [suit, ranks] of SUIT_RANKS) {
        for (let rank = 1; rank <= ranks; rank += 1)
            faces.push({ code: FACE_CODES[faces.length]!, suit, rank });
    }
    return faces;
})()

Examples

import { MAHJONG_FACES } from "@johnmorrisdotca/jarajara";
console.log(MAHJONG_FACES.length);
42

What it prints (run when this page was built)

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