defaultBoardForfunction
The board a game OPENS on, where nothing else has said: its own
defaultBoard if it has one, else the first of its boards.
Asked for by name rather than read off the front of the list, because the list is in numerical order and the two facts had been the same number by accident. Sorting the lists moved Halma's default from its own sixteen to the quick eight and Honeycomb's from the 91-cell board to the 37, and nothing would have said so.
Import it
import { defaultBoardFor } from "@johnmorrisdotca/narabe";
Definition
function defaultBoardFor(variant: RuleVariant): number
Parameters
| Name | Type | Description |
|---|---|---|
variant | RuleVariant | The native rule variant identifier. |
Returns
number
The board a game OPENS on, where nothing else has said: its own defaultBoard if it has one, else the first of its boards. Asked for by name rather than read off the front of the list, because the list is in numerical order and the two facts had been the same number by accident. Sorting the lists moved Halma's default from its own sixteen to the quick eight and Honeycomb's from the 91-cell board to the 37, and nothing would have said so.
Examples
import { defaultBoardFor } from "@johnmorrisdotca/narabe";
console.log(defaultBoardFor("reversi"));8What it prints (run when this page was built)