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

arrangeTilesfunction

The tiles in an order, as a new list; see arrangeIndexes for what each order is.

Import it

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

Definition

function arrangeTiles(codes: readonly string[], order?: TileOrder): string[]

Parameters

NameTypeDescription
codesreadonly string[]

The tile face codes in current order.

order (optional)TileOrder

The native tile sorting mode.

Returns

string[]

The tiles in an order, as a new list; see arrangeIndexes for what each order is.

Examples

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

console.log(arrangeTiles(["F","a","b"],"suit"));
[ 'a', 'b', 'F' ]

What it prints (run when this page was built)

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