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

Getting started

Getting started

Install Jarajara and deal a seeded Awase layout.

Jarajara supplies mahjong tiles and stacked layouts, SVG artwork and Awase matching solitaire. The shared table is a scoring matching game for two to four; these APIs are not a complete riichi round/scoring engine.

Install

npm install @johnmorrisdotca/jarajara

The typed ES modules run in Node 22 or later or modern browsers. Pure rules and string drawing work without a page; custom elements have their own registration entry.

Make a seeded Awase deal

import {generateAwase,checkAwase} from "@johnmorrisdotca/jarajara/awase";
const deal = generateAwase(4,"easy",2026);
console.log(deal.size,deal.givens.length);
console.log(checkAwase(deal.size,deal.givens,deal.solution));
4 8
{ ok: true }

The layout size is tiles across, not the tile count: size 4 names the native Tiny layout. A deal records face codes and a solution as a move record. Each generated deal has a clearing order; players can still make choices that block it.

Next steps

Names/racks, SVG/designs, solo/challenges, shared tables, elements/sounds and the reference cover the APIs.

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