Reference · Gunjin Shogi club rules
GUNJIN_SHOGI_RULESconstant
The documented 31-piece club ruleset, on a plain 9×9 board.
Import it
import { GUNJIN_SHOGI_RULES } from "@johnmorrisdotca/gunjin/gunjin-shogi";
Definition
const GUNJIN_SHOGI_RULES: ModeRules = {
mode: "gunjin-shogi",
defaultWidth: 9,
defaultHeight: 9,
acceptsSize: (width, height) => width === 9 && height === 9,
roster: () => ROSTER,
validateSetup,
legalDestinations,
resolveMove,
}
Members
| Name | Type | Description |
|---|---|---|
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 |
Examples
import { GUNJIN_SHOGI_RULES } from "@johnmorrisdotca/gunjin/gunjin-shogi";
console.log(GUNJIN_SHOGI_RULES.mode);gunjin-shogiWhat it prints (run when this page was built)