Skip to the content

Gunjin documentation

Gunjin API: every export

Every export of every entry point, each with its own page. This page keeps the addresses the old one-page reference had.

@johnmorrisdotca/gunjin/hasami

hasamiRosterfunction

Returns the ordered private setup roster for the selected square board size.

playHasamiMovefunction

Applies a legal move action to a Hasami match, rejecting stale turns.

submitHasamiSetupfunction

Submits one player's complete setup; the expected step rejects stale submissions.

@johnmorrisdotca/gunjin/luzhanqi-mini

@johnmorrisdotca/gunjin/salpakan

playSalpakanMovefunction

Applies a legal move action, rejecting stale turn numbers.

salpakanRosterfunction

Returns the ordered 21-piece setup roster for one side.

submitSalpakanSetupfunction

Submits a complete side setup and advances the hotseat setup phase.

@johnmorrisdotca/gunjin/stratego-lite

acceptDrawfunction

Accepts the other player's pending draw offer using the current turn token.

acknowledgePassfunction

Confirms that the device has passed to the player named on the cover screen.

declineDrawfunction

Makes a declined draw offer available again to the moving player.

offerDrawfunction

Offers a draw; the other player must accept it on their turn.

playMovefunction

Current-player moves with deterministic stale-turn rejection.

resignMatchfunction

Resignation is public and ends the active player's match.

rosterForSetupfunction

The private roster for the player currently arranging their side.

STRATEGO_LITE_RULESconstant

Original streamlined capture-flag rules using the published Original roster and combat table.

strategoCombatfunction

Resolves a Capture Flag battle without mutating either piece or match.

submitSetupfunction

Submits one player's hidden setup and then shows a pass-device screen.

@johnmorrisdotca/gunjin/gunjin-shogi

acceptDrawfunction

Accepts the other player's pending draw offer using the current turn token.

acknowledgePassfunction

Confirms that the device has passed to the player named on the cover screen.

declineDrawfunction

Makes a declined draw offer available again to the moving player.

gunjinCombatfunction

Resolves a club-rules Gunjin Shogi battle without mutating match state.

offerDrawfunction

Offers a draw; the other player must accept it on their turn.

playMovefunction

Current-player moves with deterministic stale-turn rejection.

resignMatchfunction

Resignation is public and ends the active player's match.

rosterForSetupfunction

The private roster for the player currently arranging their side.

submitSetupfunction

Submits one player's hidden setup and then shows a pass-device screen.

@johnmorrisdotca/gunjin/trusted

@johnmorrisdotca/gunjin/views

boardFeaturesfunction

Public board markings (camps, headquarters and lakes), with no role-dependent information.

publicPositionfunction

Redacted position for spectators: only player ownership and occupied cells are returned.

viewForPlayerfunction

A player view redacts opponent roles and suppresses the board during device handoff.

@johnmorrisdotca/gunjin/draw

DrawOptionstype

Visual settings and temporary selection marks for the role-redacted SVG renderer.

@johnmorrisdotca/gunjin/play

GunjinMounttype

Public controls returned by mountGunjin; no authoritative state is exposed.

MountOptionstype

Locale, materials, and safe public callbacks for a mounted hotseat player.

@johnmorrisdotca/gunjin

boardFeaturesfunction

Public board markings (camps, headquarters and lakes), with no role-dependent information.

Coordinatetype

Zero-based board location shared by engine actions and public views.

decodePublicReplayfunction

Validates a role-free replay record for display; it cannot resume a match.

DrawOptionstype

Visual settings and temporary selection marks for the role-redacted SVG renderer.

GameModetype

Selects one of the five rule modules supported by this package.

GUNJIN_STYLEconstant

Scoped presentation styles applied by the hotseat mount.

GunjinMounttype

Public controls returned by mountGunjin; no authoritative state is exposed.

Languagetype

Supported interface locales.

MatchResulttype

Public outcome recorded when a match ends.

Materialtype

Board palettes shared with the game family.

modeNamefunction

Returns the localized display name for a ruleset.

MountOptionstype

Locale, materials, and safe public callbacks for a mounted hotseat player.

MoveActiontype

Move requests are public, deterministic and rejected if their turn is stale.

Playertype

The player whose private side is red.

playerNamefunction

Returns the localized name for one side.

PlayerViewtype

Information safe to render for one player at the current pass boundary.

publicPositionfunction

Redacted position for spectators: only player ownership and occupied cells are returned.

PublicPositiontype

Role-free current position suitable for observers and change callbacks.

publicReplayfunction

Creates a public replay with only combat ranks that the selected rules expose.

PublicReplaytype

A shareable record without private setups or piece IDs; only mode-published combat ranks may appear.

roleNamefunction

Returns a localized piece label, with a readable fallback for unknown roles.

STRINGSconstant

English and Japanese interface labels used by the renderer and player.

viewForPlayerfunction

A player view redacts opponent roles and suppresses the board during device handoff.

wordsfunction

Returns the localized interface string table.