generateCrossSums関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Makes a seeded board of size squares a side (counting the row and column of totals) and proves it has one
answer. A random pattern of black squares sets the runs, random digits fill them, and digits are changed until
the answer is single. The board is then rated by solving it: easy by the single-run rules, medium once a digit
that must appear has to be traced, hard by supposing, and extra-hard the most-supposing of several boards.
If no board of the level is found within the attempts the next level down is tried, and the first generator
(a 10×10 only) is the last resort, so a seed never throws.
インポート
import { generateCrossSums } from "@johnmorrisdotca/kazu/cross-sums";
ほかのエクスポート元: @johnmorrisdotca/kazu
定義
function generateCrossSums(seed?: number, level?: CrossSumsLevel, size?: number): CrossSumsPuzzle
引数
| 名前 | 型 | 説明 |
|---|---|---|
seed (省略可) | number | The reproducible native puzzle seed. |
level (省略可) | CrossSumsLevel | The requested native difficulty tier. |
size (省略可) | number | The supported square board side length. |
戻り値
CrossSumsPuzzle
Makes a seeded board of size squares a side (counting the row and column of totals) and proves it has one answer. A random pattern of black squares sets the runs, random digits fill them, and digits are changed until the answer is single. The board is then rated by solving it: easy by the single-run rules, medium once a digit that must appear has to be traced, hard by supposing, and extra-hard the most-supposing of several boards. If no board of the level is found within the attempts the next level down is tried, and the first generator (a 10×10 only) is the last resort, so a seed never throws.
例
import { generateCrossSums } from "@johnmorrisdotca/kazu/cross-sums";
console.log(generateCrossSums(42,"easy",5));この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。