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

ViewedPiecetype

Player-facing piece. Opponent kind is always null and opponent IDs are omitted.

Import it

import type { ViewedPiece } from "@johnmorrisdotca/gunjin";

Definition

type ViewedPiece = Coordinate & {
    owner: Player;
    kind: string | null;
    hidden: boolean;
    id?: string;
};

Members

NameTypeDescription
xnumber
ynumber
ownerPlayer
kindstring | null
hiddenboolean
id (optional)string | undefined

Examples

import type { ViewedPiece } from "@johnmorrisdotca/gunjin";

const value: ViewedPiece = {owner:1,x:0,y:0,kind:null,hidden:true};
console.log(value);
{ owner: 1, x: 0, y: 0, kind: null, hidden: true }

What it prints (run when this page was built)

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