GUNJIN_SHOGI_RULES定数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The documented 31-piece club ruleset, on a plain 9×9 board.
インポート
import { GUNJIN_SHOGI_RULES } from "@johnmorrisdotca/gunjin/gunjin-shogi";
定義
const GUNJIN_SHOGI_RULES: ModeRules = {
mode: "gunjin-shogi",
defaultWidth: 9,
defaultHeight: 9,
acceptsSize: (width, height) => width === 9 && height === 9,
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 { GUNJIN_SHOGI_RULES } from "@johnmorrisdotca/gunjin/gunjin-shogi";
console.log(GUNJIN_SHOGI_RULES.mode);gunjin-shogi出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。