Reference · Rules, games and records
cubeInPlayfunction
Whether the cube is in play in a game of a match, given whether this is the Crawford game.
Import it
import { cubeInPlay } from "@johnmorrisdotca/sugoroku";
Definition
function cubeInPlay(rules: Rules, crawfordGame: boolean): boolean
Parameters
| Name | Type | Description |
|---|---|---|
rules | Rules | The complete or partial native rules specified by the signature. |
crawfordGame | boolean | Whether this is the match’s cube-free Crawford game. |
Returns
boolean
Whether the cube is in play in a game of a match, given whether this is the Crawford game.
Examples
import { cubeInPlay, settingsFor } from "@johnmorrisdotca/sugoroku";
const settings = settingsFor("backgammon",{points:5,cube:true});
console.log(cubeInPlay(settings.rules,false));trueWhat it prints (run when this page was built)