ENGLISH_CHECKERS_RULESconstant
English draughts, American checkers: three rows of men, a man takes forward only, a king moves one square, any capture may be chosen, and a man crowned by a capture ends the move there. Exactly what rules/checkers.ts did before any of this was data, and the Checkers tests that predate it still say so.
Import it
import { ENGLISH_CHECKERS_RULES } from "@johnmorrisdotca/narabe";
Definition
const ENGLISH_CHECKERS_RULES: CheckersRules = {
menRows: 3,
menCaptureBackward: false,
flyingKings: false,
captureChoice: CAPTURE_CHOICES.free,
crownMidCapture: CROWN_MID_CAPTURE.stops,
repetitionDraw: null,
endgameCounts: [],
}
Members
| Name | Type | Description |
|---|---|---|
menRows | number | Rows of men each side starts with, on the dark squares of its own side of the board. |
menCaptureBackward | boolean | Whether a man may capture backward as well as forward. It always steps forward only. |
flyingKings | boolean | Whether a king flies: moves any distance along an open diagonal, and takes a piece at any distance, landing on any empty square beyond it. Otherwise a king moves one square and jumps an adjacent piece, as a man does, both ways. |
captureChoice | CaptureChoice | |
crownMidCapture | CrownMidCapture | |
repetitionDraw | number | null | The same position standing for this many times, with the same side to move, is a draw. Null where this game is not played with a repetition rule here. |
endgameCounts | readonly EndgameCount[] | The endings the stronger side must win within a count of moves, or draw. |
Examples
import { ENGLISH_CHECKERS_RULES } from "@johnmorrisdotca/narabe";
console.log(ENGLISH_CHECKERS_RULES);{
menRows: 3,
menCaptureBackward: false,
flyingKings: false,
captureChoice: 'free',
crownMidCapture: 'stops',
repetitionDraw: null,
endgameCounts: []
}What it prints (run when this page was built)