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

Replayedtype

Where a solve stands after its moves: the tiles, and how many shuffles it has had.

Import it

import type { Replayed } from "@johnmorrisdotca/jarajara";

Definition

type Replayed = {
    cells: MahjongCells;
    shuffles: number;
};

Members

NameTypeDescription
cellsstring
shufflesnumber

Examples

import { generateAwase } from "@johnmorrisdotca/jarajara/awase";
import { freePairs, geometryOf, layoutFor, playSolve } from "@johnmorrisdotca/jarajara";
import type { Replayed } from "@johnmorrisdotca/jarajara";

const deal = generateAwase(4,"easy",2026);
const layout = layoutFor(4)!;
const geometry = geometryOf(layout);
const cells = deal.givens;
const pair = freePairs(geometry,cells,"group")[0];
const value: Replayed = playSolve(4,cells,[{pair}],"group")!;
console.log(value);
{ cells: 'xPNx.BB.', shuffles: 0 }

What it prints (run when this page was built)

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