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

tilesLeftfunction

How many tiles are still on the layout.

Import it

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

Definition

function tilesLeft(cells: MahjongCells): number

Parameters

NameTypeDescription
cellsstring

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

Returns

number

How many tiles are still on the layout.

Examples

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

const deal = generateAwase(4,"easy",2026);
const cells = deal.givens;
console.log(tilesLeft(cells));
8

What it prints (run when this page was built)

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