Reference · Mazes, arrows and mixed boards
stoneRulesOffunction
The rules an option means for a maze of cells cells, or null when the option is no stones.
Import it
import { stoneRulesOf } from "@johnmorrisdotca/meikyuu";
Definition
function stoneRulesOf(option: StoneOption | undefined, cells: number): StoneRules | null
Parameters
| Name | Type | Description |
|---|---|---|
option | StoneOption | undefined | The host’s stone setting, or undefined for off. |
cells | number | A cell-index path or total count specified by this signature. |
Returns
StoneRules | null
The validated native limit/reach, or null when stones are disabled.
Examples
import { stoneRulesOf } from "@johnmorrisdotca/meikyuu";
console.log(stoneRulesOf(true,25));{ limit: 3, reach: 2 }What it prints (run when this page was built)