starPiecesHomefunction
How many of stone's pieces stand in the far point.
Import it
import { starPiecesHome } from "@johnmorrisdotca/narabe";
Definition
function starPiecesHome(board: Cell[], size: number, radius: number, stone: Stone): number
Parameters
| Name | Type | Description |
|---|---|---|
board | Cell[] | The row-major board cells; null marks an empty point. |
size | number | The number of cells on each side of the board. |
radius | number | The Chinese Checkers star radius. |
stone | Stone | The black or white colour being examined. |
Returns
number
How many of stone's pieces stand in the far point.
Examples
import { STAR_RADIUS, createGame, starPiecesHome } from "@johnmorrisdotca/narabe";
const star = createGame({variant:"chineseCheckers"});
console.log(starPiecesHome(star.board,star.settings.size,STAR_RADIUS,"black"));0What it prints (run when this page was built)