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 · Shared Awase table

startTablefunction

A new game at the table: the deal made from the seed, these seats, and nothing taken.

Import it

import { startTable } from "@johnmorrisdotca/jarajara/table";

Definition

function startTable(deal: { size: number; level: AwaseLevel; seed: number; givens: string; }, seats: readonly AwaseSeat[]): AwaseTable

Parameters

NameTypeDescription
deal{ size: number; level: AwaseLevel; seed: number; givens: string; }

The original size, seed and face-code deal.

seatsreadonly AwaseSeat[]

The two to four local player names and optional computer flags.

Returns

AwaseTable

A new game at the table: the deal made from the seed, these seats, and nothing taken.

Examples

import { generateAwase } from "@johnmorrisdotca/jarajara/awase";
import { startTable } from "@johnmorrisdotca/jarajara/table";

const deal = generateAwase(4,"easy",2026);
console.log(startTable(deal,[{name:"Seat 1"},{name:"Seat 2"}]).seats.length);
2

What it prints (run when this page was built)

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