リファレンス
表示・再生・プレイヤー
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. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。