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 · Tile and table elements

rackWidthfunction

How wide a rack is, in tile widths: the last tile's place and the tile itself.

Import it

import { rackWidth } from "@johnmorrisdotca/jarajara/element";

Definition

function rackWidth(places: readonly RackPlace[]): number

Parameters

NameTypeDescription
placesreadonly RackPlace[]

The native rack positions.

Returns

number

How wide a rack is, in tile widths: the last tile's place and the tile itself.

Examples

import { rackPlaces, rackWidth } from "@johnmorrisdotca/jarajara/element";

console.log(rackWidth(rackPlaces(3)));
3.04

What it prints (run when this page was built)

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