campOffunction
Whose home camp point lies in, or null for the open board.
Import it
import { campOf } from "@johnmorrisdotca/narabe";
Definition
function campOf(size: number, point: Point): Stone | null
Parameters
| Name | Type | Description |
|---|---|---|
size | number | The number of cells on each side of the board. |
point | Point | A zero-based row and column on the board. |
Returns
Stone | null
The starting camp colour, or null outside both camps.
Examples
import { campOf } from "@johnmorrisdotca/narabe";
console.log(campOf(8,{row:0,col:0}));blackWhat it prints (run when this page was built)