KAZU_BOXES定数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A 9×9 has 3×3 boxes and a 4×4 has 2×2; a 6×6 has boxes two rows tall and three columns wide, which is the one people get wrong and the reason this is a table rather than a square root.
インポート
import { KAZU_BOXES } from "@johnmorrisdotca/kazu";
定義
const KAZU_BOXES: Record<number, Boxes> = {
4: { rows: 2, cols: 2 },
6: { rows: 2, cols: 3 },
9: { rows: 3, cols: 3 },
16: { rows: 4, cols: 4 },
25: { rows: 5, cols: 5 },
}
例
import { KAZU_BOXES } from "@johnmorrisdotca/kazu";
console.log(KAZU_BOXES);{
'4': { rows: 2, cols: 2 },
'6': { rows: 2, cols: 3 },
'9': { rows: 3, cols: 3 },
'16': { rows: 4, cols: 4 },
'25': { rows: 5, cols: 5 }
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。