stonesLeftfunction
Stones the colour to move still has to place before the turn passes.
Import it
import { stonesLeft } from "@johnmorrisdotca/narabe";
Definition
function stonesLeft(state: GameState): number
Parameters
| Name | Type | Description |
|---|---|---|
state | GameState | The current immutable game position. |
Returns
number
Stones the colour to move still has to place before the turn passes.
Examples
import { createGame, stonesLeft } from "@johnmorrisdotca/narabe";
const state = createGame({variant:"freestyle",size:15});
console.log(stonesLeft(state));1What it prints (run when this page was built)