Reference · Rules, games and records
allHomefunction
Whether every checker of side still in play is in its home board (own points 1 to 6): the condition for bearing off.
Import it
import { allHome } from "@johnmorrisdotca/sugoroku";
Definition
function allHome(position: Position, side: Side): boolean
Parameters
| Name | Type | Description |
|---|---|---|
position | Position | The native checker counts, bar, reserve and borne-off counts. |
side | Side | The side being examined: white or black. |
Returns
boolean
Whether every checker of side still in play is in its home board (own points 1 to 6): the condition for bearing off.
Examples
import { allHome, settingsFor, startPosition } from "@johnmorrisdotca/sugoroku";
const settings = settingsFor("backgammon",{points:5,cube:true});
const spec = settings.variant;
const position = startPosition(spec);
console.log(allHome(position,"white"));falseWhat it prints (run when this page was built)