starPiecesHome関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
How many of stone's pieces stand in the far point.
インポート
import { starPiecesHome } from "@johnmorrisdotca/narabe";
定義
function starPiecesHome(board: Cell[], size: number, radius: number, stone: Stone): number
引数
| 名前 | 型 | 説明 |
|---|---|---|
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. |
戻り値
number
How many of stone's pieces stand in the far point.
例
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出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。