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

seatNamefunction

What a seat is called: its name, "Computer 2", or its wind.

Import it

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

Definition

function seatName(seats: readonly AwaseSeat[], at: number): string

Parameters

NameTypeDescription
seatsreadonly AwaseSeat[]

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

atnumber

The supplied time in milliseconds, or the zero-based seat index specified by the signature.

Returns

string

What a seat is called: its name, "Computer 2", or its wind.

Examples

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

console.log(seatName([{name:"Seat 1"},{name:"Seat 2"}],0));
Seat 1

What it prints (run when this page was built)

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