Skip to the content

Narabe並べ

Play forty-eight abstract board games through immutable moves, legal choices and replayable records.

Narabe means arranging in Japanese, as in gomoku-narabe: five in a row. About the name

Contents

Reference · Rules and records

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

NameTypeDescription
boardCell[]

The row-major board cells; null marks an empty point.

sizenumber

The number of cells on each side of the board.

radiusnumber

The Chinese Checkers star radius.

stoneStone

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"));
0

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/narabe 1.3.0.