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

pairsLeftfunction

The tiles left on a layout as pairs that match, each pair's tiles together: what a shuffle lays again.

Import it

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

Definition

function pairsLeft(cells: MahjongCells, rule: MahjongBonusRule): [string, string][]

Parameters

NameTypeDescription
cellsstring

The face-code string in native slot order; dot marks a removed tile.

ruleMahjongBonusRule

Grouped or identical bonus matching.

Returns

[string, string][]

The tiles left on a layout as pairs that match, each pair's tiles together: what a shuffle lays again.

Examples

import { generateAwase } from "@johnmorrisdotca/jarajara/awase";
import { pairsLeft } from "@johnmorrisdotca/jarajara";

const deal = generateAwase(4,"easy",2026);
const cells = deal.givens;
console.log(pairsLeft(cells,"group"));
[ [ 'B', 'B' ], [ 'D', 'D' ], [ 'N', 'P' ], [ 'x', 'x' ] ]

What it prints (run when this page was built)

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