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

AWASE_CHALLENGESconstant

AWASE WITH RULES YOU CHOOSE: options a game may be given (hints, shuffles and undo given, limited or taken away) and the challenges worth playing a deal for. The ideas come from the challenge modes of good mahjong solitaires (see CREDITS.md); the code and the numbers are Jarajara's own. None of it touches a deal: a challenge is played on exactly the tiles generateAwase made, so every deal here can still be cleared, and checkAwase still judges a solve by the tiles alone.

A game is an AwaseRun: plain data, changed only by returning a new one. It has no clock of its own: every move is given at, milliseconds on any clock the caller keeps (only the differences matter), so a run is as testable as any other rule here and a server may replay one.

The challenges, each the same deal played for something else: gold take a pair of the gold face, four tiles ringed in gold: hunt it down, the stacks permitting spark clear the layout before time runs out; a pair of the spark face adds time and sends the spark on rush make the goal number of pairs before time runs out; the layout need not be cleared fortune reach the goal score before time runs out; fast pairs in a row build a multiplier sand clear the layout from a little time, every pair adding some, to a limit purge take every tile of the marked group before time runs out blackout clear the layout with only the free tiles showing their faces; no undo

Import it

import { AWASE_CHALLENGES } from "@johnmorrisdotca/jarajara/awase";

Definition

const AWASE_CHALLENGES: readonly ["gold", "spark", "rush", "fortune", "sand", "purge", "blackout"] = ["gold", "spark", "rush", "fortune", "sand", "purge", "blackout"] as const

Examples

import { AWASE_CHALLENGES } from "@johnmorrisdotca/jarajara/awase";
console.log(AWASE_CHALLENGES);
[
  'gold',     'spark',
  'rush',     'fortune',
  'sand',     'purge',
  'blackout'
]

What it prints (run when this page was built)

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