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 · Tiles, layouts and deals

layoutExtentfunction

The layout's extent in half units: how far right and down its tiles reach, and how many layers.

Import it

import { layoutExtent } from "@johnmorrisdotca/jarajara";

Definition

function layoutExtent(layout: MahjongLayout): { width: number; height: number; layers: number; }

Parameters

NameTypeDescription
layoutMahjongLayout

The native stacked tile positions.

Returns

{ width: number; height: number; layers: number; }

The layout's extent in half units: how far right and down its tiles reach, and how many layers.

Examples

import { layoutExtent, layoutFor } from "@johnmorrisdotca/jarajara";

const layout = layoutFor(4)!;
console.log(layoutExtent(layout));
{ width: 8, height: 2, layers: 3 }

What it prints (run when this page was built)

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