Skip to the content

Gunjin軍人

Play five hidden-rank games, keep setups private, share redacted views and replay, and pass one device between players.

Gunjin is the Japanese word 軍人 for a soldier. About the name

Contents

Reference · Views, replay and player

playerNamefunction

Returns the localized name for one side.

Import it

import { playerName } from "@johnmorrisdotca/gunjin";

Definition

function playerName(language: Language, player: Player): string

Parameters

NameTypeDescription
languageLanguage

The native English or Japanese display language.

playerPlayer

The acting player, 0 or 1; the lifecycle checks that this is the expected player.

Returns

string

Returns the localized name for one side.

Examples

import { playerName } from "@johnmorrisdotca/gunjin";

console.log(playerName("en",0));
Red

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/gunjin 0.2.1.