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

MatchResulttype

Public outcome recorded when a match ends.

Import it

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

Definition

type MatchResult = {
    winner: Player | null;
    reason: "objective-captured" | "capture-threshold" | "blocked" | "flag-won" | "flag-held" | "resigned" | "agreed-draw" | "repetition";
};

Members

NameTypeDescription
winnerPlayer | null
reason"objective-captured" | "capture-threshold" | "blocked" | "flag-won" | "flag-held" | "resigned" | "agreed-draw" | "repetition"

Examples

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

const value: MatchResult = {winner:null,reason:"agreed-draw"};
console.log(value);
{ winner: null, reason: 'agreed-draw' }

What it prints (run when this page was built)

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