STRATEGO_LITE_RULES定数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Original streamlined capture-flag rules using the published Original roster and combat table.
インポート
import { STRATEGO_LITE_RULES } from "@johnmorrisdotca/gunjin/stratego-lite";
定義
const STRATEGO_LITE_RULES: ModeRules = {
mode: "stratego-lite",
defaultWidth: 10,
defaultHeight: 10,
acceptsSize: (width, height) => width === 10 && height === 10,
roster: () => ROSTER,
validateSetup,
legalDestinations,
resolveMove,
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
mode | GameMode | |
defaultWidth | number | |
defaultHeight | number | |
acceptsSize | (width: number, height: number) => boolean | |
roster | (player: Player, width: number, height: number) => readonly string[] | |
validateSetup | (player: Player, placements: readonly SetupPiece[]) => boolean | |
legalDestinations | (match: AuthoritativeMatch, piece: Piece) => readonly Coordinate[] | |
resolveMove | (match: AuthoritativeMatch, piece: Piece, destination: Coordinate) => MoveResolution |
例
import { STRATEGO_LITE_RULES } from "@johnmorrisdotca/gunjin/stratego-lite";
console.log(STRATEGO_LITE_RULES.mode);stratego-lite出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。