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

encodeTablefunction

As kept in the browser: the table as JSON, its takes as slot pairs.

Import it

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

Definition

function encodeTable(table: AwaseTable): string

Parameters

NameTypeDescription
tableAwaseTable

The shared native table and its recorded pair takes.

Returns

string

As kept in the browser: the table as JSON, its takes as slot pairs.

Examples

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

const deal = generateAwase(4,"easy",2026);
const table = startTable(deal,[{name:"Seat 1"},{name:"Seat 2"}]);
console.log(encodeTable(table));
{"v":1,"size":4,"level":"easy","seed":2026,"givens":"xPNxDBBD","seats":[{"name":"Seat 1"},{"name":"Seat 2"}],"takes":[]}

What it prints (run when this page was built)

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