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 · Awase solitaire

AwaseChecktype

What a check of a finished game says: cleared, or the first reason it is not.

Import it

import type { AwaseCheck } from "@johnmorrisdotca/jarajara/awase";

Also exported from: @johnmorrisdotca/jarajara

Definition

type AwaseCheck = {
    ok: true;
} | {
    ok: false;
    reason: string;
};

Examples

import { checkAwase, generateAwase } from "@johnmorrisdotca/jarajara/awase";
import type { AwaseCheck } from "@johnmorrisdotca/jarajara/awase";

const deal = generateAwase(4,"easy",2026);
const value: AwaseCheck = checkAwase(4,deal.givens,deal.solution);
console.log(value);
{ ok: true }

What it prints (run when this page was built)

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