リファレンス
隠し旗取りの規則
import { … } from "@johnmorrisdotca/gunjin/stratego-lite";
最小化と gzip 圧縮をしたサイズは 4.9 kB(読み込むものをすべて含み、esbuild で計測)
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Shared immutable match lifecycle for the Capture Flag ruleset.
エクスポート
| 名前 | 種類 | 概要 |
|---|---|---|
acceptDraw | 関数 | Accepts the other player's pending draw offer using the current turn token. |
acknowledgePass | 関数 | Confirms that the device has passed to the player named on the cover screen. |
createMatch | 関数 | Creates an authoritative match. |
declineDraw | 関数 | Makes a declined draw offer available again to the moving player. |
offerDraw | 関数 | Offers a draw; the other player must accept it on their turn. |
playMove | 関数 | Current-player moves with deterministic stale-turn rejection. |
resignMatch | 関数 | Resignation is public and ends the active player's match. |
rosterForSetup | 関数 | The private roster for the player currently arranging their side. |
STRATEGO_LITE_RULES | 定数 | Original streamlined capture-flag rules using the published Original roster and combat table. |
strategoCombat | 関数 | Resolves a Capture Flag battle without mutating either piece or match. |
submitSetup | 関数 | Submits one player's hidden setup and then shows a pass-device screen. |
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。