BlockInfo型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The blocks of a board, in the order of their anchors, and which block each cell is in (-1 for none).
インポート
import type { BlockInfo } from "@johnmorrisdotca/suido";
定義
type BlockInfo = {
blocks: readonly Block[];
of: Int32Array;
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
blocks | readonly Block[] | |
of | Int32Array<ArrayBufferLike> |
例
import { SUIDO_5X5 } from "@johnmorrisdotca/suido/levels-5x5";
import { blockInfo, decodeLayout } from "@johnmorrisdotca/suido";
import type { BlockInfo } from "@johnmorrisdotca/suido";
const row = SUIDO_5X5[0];
const code = row[0];
const layout = decodeLayout(code)!;
const blockLayout = {...layout,bigs:[0]};
const value: BlockInfo = blockInfo(blockLayout);
console.log(value);{
blocks: [ { index: 0, anchor: 0, big: true, cells: [Array] } ],
of: Int32Array(25) [
0, 0, -1, -1, -1, 0, 0, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
-1
]
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。