Reference · Hidden capture-flag rules
STRATEGO_LITE_RULESconstant
Original streamlined capture-flag rules using the published Original roster and combat table.
Import it
import { STRATEGO_LITE_RULES } from "@johnmorrisdotca/gunjin/stratego-lite";
Definition
const STRATEGO_LITE_RULES: ModeRules = {
mode: "stratego-lite",
defaultWidth: 10,
defaultHeight: 10,
acceptsSize: (width, height) => width === 10 && height === 10,
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 { STRATEGO_LITE_RULES } from "@johnmorrisdotca/gunjin/stratego-lite";
console.log(STRATEGO_LITE_RULES.mode);stratego-liteWhat it prints (run when this page was built)