本文へ移動

Gunjin軍人

階級を隠す5つの対戦ゲームで、配置を非公開に保ち、表示や再生を共有し、1台の端末を交代して遊べます。

「軍人」は、兵士を表す言葉です。 名前について(英語)

目次

リファレンス

表示・再生・プレイヤー

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

最小化と gzip 圧縮をしたサイズは 12.9 kB(読み込むものをすべて含み、esbuild で計測)

リファレンスの説明と例は英語です。見出しと目次は日本語です。

SVG board rendering and its optional visual settings.

エクスポート

名前種類概要
boardFeatures関数Public board markings (camps, headquarters and lakes), with no role-dependent information.
Coordinate型Zero-based board location shared by engine actions and public views.
decodePublicReplay関数Validates a role-free replay record for display; it cannot resume a match.
drawGunjinBoard関数Draws only a redacted player view.
DrawOptions型Visual settings and temporary selection marks for the role-redacted SVG renderer.
encodePublicReplay関数Serializes the role-redacted public replay record as JSON.
GameMode型Selects one of the five rule modules supported by this package.
GUNJIN_STYLE定数Scoped presentation styles applied by the hotseat mount.
GunjinMount型Public controls returned by mountGunjin; no authoritative state is exposed.
Language型Supported interface locales.
legalMovesForCurrentPlayer関数Legal move coordinates for the player whose turn it is; roles are never returned.
MatchResult型Public outcome recorded when a match ends.
Material型Board palettes shared with the game family.
modeName関数Returns the localized display name for a ruleset.
mountGunjin関数Mounts a hotseat player.
MountOptions型Locale, materials, and safe public callbacks for a mounted hotseat player.
MoveAction型Move requests are public, deterministic and rejected if their turn is stale.
PieceStyle型Available piece silhouettes.
Player型The player whose private side is red.
playerName関数Returns the localized name for one side.
PlayerView型Information safe to render for one player at the current pass boundary.
publicPosition関数Redacted position for spectators: only player ownership and occupied cells are returned.
PublicPosition型Role-free current position suitable for observers and change callbacks.
publicReplay関数Creates a public replay with only combat ranks that the selected rules expose.
PublicReplay型A shareable record without private setups or piece IDs; only mode-published combat ranks may appear.
roleName関数Returns a localized piece label, with a readable fallback for unknown roles.
STRINGS定数English and Japanese interface labels used by the renderer and player.
ViewedPiece型Player-facing piece.
viewForPlayer関数A player view redacts opponent roles and suppresses the board during device handoff.
words関数Returns the localized interface string table.

ソースを見るGitHub で編集@johnmorrisdotca/gunjin 0.2.1 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。