Cage型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A cage: the cells in it and the sum of the numbers inside.
インポート
import type { Cage } from "@johnmorrisdotca/kazu";
定義
type Cage = {
cells: number[];
sum: number;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
cells | number[] | |
sum | number |
例
import { decodeKiller } from "@johnmorrisdotca/kazu";
import type { Cage } from "@johnmorrisdotca/kazu";
const killer = decodeKiller("2.....3..2................2...4.....012333412567882967aaa9bbccd9ebfgggee02050c0d03020309080e0c0a06020b040a",6)!;
const value: Cage = killer.cages[0];
console.log(value);{ cells: [ 0 ], sum: 2 }出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。