Reference · Rules, games and records
sideIndexfunction
0 for white and 1 for black: where a side's counts are kept in a position.
Import it
import { sideIndex } from "@johnmorrisdotca/sugoroku";
Definition
function sideIndex(side: Side): 0 | 1
Parameters
| Name | Type | Description |
|---|---|---|
side | Side | The side being examined: white or black. |
Returns
0 | 1
0 for white and 1 for black: where a side's counts are kept in a position.
Examples
import { sideIndex } from "@johnmorrisdotca/sugoroku";
console.log(sideIndex("black"));1What it prints (run when this page was built)