Reference · Rules, games and records
openingFromfunction
An opening throw from a source: one die for white and one for black.
Import it
import { openingFrom } from "@johnmorrisdotca/sugoroku";
Definition
function openingFrom(source: DiceSource): [number, number]
Parameters
| Name | Type | Description |
|---|---|---|
source | DiceSource | A die source returning a valid integer from 1 to 6. |
Returns
[number, number]
An opening throw from a source: one die for white and one for black.
Examples
import { openingFrom, seededDice } from "@johnmorrisdotca/sugoroku";
console.log(openingFrom(seededDice(42)));[ 4, 3 ]What it prints (run when this page was built)