JuosanPuzzle型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A seeded Juosan board with its verified solution and native difficulty tier.
インポート
import type { JuosanPuzzle } from "@johnmorrisdotca/kazu/juosan";
ほかのエクスポート元: @johnmorrisdotca/kazu
定義
type JuosanPuzzle = JuosanBoard & {
seed: number;
level: JuosanLevel;
solution: readonly JuosanMark[];
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
width | number | |
height | number | |
territories | readonly JuosanTerritory[] | |
seed | number | |
level | JuosanLevel | |
solution | readonly JuosanMark[] |
例
import type { JuosanPuzzle } from "@johnmorrisdotca/kazu/juosan";
const juosanPuzzle: JuosanPuzzle = {"width":3,"height":2,"territories":[{"cells":[0,1,2],"difference":3},{"cells":[3,4,5],"difference":3}],"seed":42,"level":"easy","solution":[1,1,1,1,1,1]};
const value: JuosanPuzzle = juosanPuzzle;
console.log(value);{
width: 3,
height: 2,
territories: [
{ cells: [Array], difference: 3 },
{ cells: [Array], difference: 3 }
],
seed: 42,
level: 'easy',
solution: [ 1, 1, 1, 1, 1, 1 ]
}出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。