isKingAt関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Whether the piece at at, if any, is a king.
インポート
import { isKingAt } from "@johnmorrisdotca/narabe";
定義
function isKingAt(kings: readonly Point[], at: Point): boolean
引数
| 名前 | 型 | 説明 |
|---|---|---|
kings | readonly Point[] | The points occupied by crowned pieces. |
at | Point | The point to examine. |
戻り値
boolean
Whether the piece at at, if any, is a king.
例
import { createGame, isKingAt } from "@johnmorrisdotca/narabe";
const checkers = createGame({variant:"checkers"});
console.log(isKingAt(checkers.kings,{row:5,col:0}));false出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。