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

freshAwaseSeedfunction

A new seed for a deal under this rule: inside AWASE_SAME_BLOCK for the identical rule, anywhere else from 1 to SEED_MOST for the usual one. draw gives a seed for the usual rule (a site keeping blocks of seeds for its own uses passes its own); a whole number from 1 to SEED_MOST unless said.

Import it

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

Definition

function freshAwaseSeed(rule: MahjongBonusRule, random?: Random, draw?: () => number): number

Parameters

NameTypeDescription
ruleMahjongBonusRule

Grouped or identical bonus matching.

random (optional)Random

A reproducible random source returning values in [0,1).

draw (optional)() => number

An optional function drawing a seed outside separately reserved blocks.

Returns

number

A new seed for a deal under this rule: inside AWASE_SAME_BLOCK for the identical rule, anywhere else from 1 to SEED_MOST for the usual one. draw gives a seed for the usual rule (a site keeping blocks of seeds for its own uses passes its own); a whole number from 1 to SEED_MOST unless said.

Examples

import { freshAwaseSeed } from "@johnmorrisdotca/jarajara/awase";
import { seededRandom } from "@johnmorrisdotca/jarajara";

console.log(freshAwaseSeed("same",seededRandom(42)));
1560110375

What it prints (run when this page was built)

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