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

awaseRulesfunction

The rules a game is played by. A challenge sets its own; the options given are laid over what it allows, and where a challenge takes something away (undo in the spark and blackout) it stays taken away. tiles is how many tiles the layout holds, which the clocks and goals are scaled by.

Import it

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

Definition

function awaseRules(tiles: number, options?: AwaseOptions): AwaseRules

Parameters

NameTypeDescription
tilesnumber

The number of tiles in the starting layout.

options (optional)AwaseOptions

Native game, SVG, sound or presentation options.

Returns

AwaseRules

The rules a game is played by. A challenge sets its own; the options given are laid over what it allows, and where a challenge takes something away (undo in the spark and blackout) it stays taken away. tiles is how many tiles the layout holds, which the clocks and goals are scaled by.

Examples

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

const deal = generateAwase(4,"easy",2026);
const cells = deal.givens;
console.log(awaseRules(cells.length,{challenge:"rush"}));
{
  challenge: 'rush',
  hints: null,
  shuffles: null,
  undo: true,
  timeMs: 180000,
  reserveMs: null,
  pairBonusMs: 0,
  sparkBonusMs: 0,
  comboBonusMs: 0,
  goalPairs: 2,
  goalScore: null,
  hideBlocked: false
}

What it prints (run when this page was built)

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