本文へ移動

Kazu数

検証済みの数独や論理パズルを作り、標準の規則とヒントを読み、盤を描いたり埋め込んだりできます。

「数」は数字を表す言葉です。 名前について(英語)

目次

リファレンス

数字パズルのエンジン

import { … } from "@johnmorrisdotca/kazu";

最小化と gzip 圧縮をしたサイズは 64.8 kB(読み込むものをすべて含み、esbuild で計測)

リファレンスの説明と例は英語です。見出しと目次は日本語です。

Kazu 数: the Numbers family of grid puzzles. Sudoku, Jigsaw Sudoku, Diagonal Sudoku, Killer Sudoku (Sum Cages), Futoshiki (More or Less) and Skyscrapers (Towers): a seeded generator whose every puzzle has exactly one answer, at three levels; a solver that counts answers; a check that reads a finished grid in O(cells); a hint that says which cell to fill next and why; puzzles and runs as short codes; and a game in play as pure functions. The drawing is @johnmorrisdotca/kazu/draw, playing in a page is @johnmorrisdotca/kazu/play, and the tag is @johnmorrisdotca/kazu/element/define.

エクスポート

名前種類概要
AKARI_DENSER_ATTEMPTS定数The native Akari generation-attempt limit for each denser fallback.
AKARI_DENSER_CROWDS定数When a level finds no board in AKARI_MOST_ATTEMPTS plain attempts (a large board of an easy level, mostly: one attempt in a hundred succeeds on a 14×14), the generator tries again with more black squares, each of these multiples of the usual share in turn, AKARI_DENSER_ATTEMPTS attempts at each.
AKARI_LEVELS定数How hard a puzzle is made, by what a person must do to solve it; see rateAkari.
AKARI_MOST_ATTEMPTS定数The native Akari generation-attempt limit.
AKARI_MOST_NODES定数The native Akari search-node budget.
AKARI_MOST_SIDE定数The maximum supported Akari board dimension.
AKARI_PLAY_STYLE定数Scoped native Akari board and player CSS.
AKARI_SIZES定数The sides the demo and the site offer for a square board; any side from 2 to AKARI_MOST_SIDE can be made.
AKARI_STRINGS定数Native English and Japanese labels and announcements for Akari.
AkariBoard型A board is row-major.
AkariCheck型The Akari completion result and cells that violate its native rules.
AkariDrawOptions型Current Akari marks or entries, selection, errors and native SVG appearance choices.
akariFinished関数A game is finished only when its bulbs satisfy every rule and light every white square.
AkariGame型The immutable Akari board, current entries or marks, undo history and assistance state.
AkariLanguage型The native English or Japanese display language for Akari.
AkariLevel型A native difficulty tier for generated Akari puzzles.
AkariMaterial型A supported material of the native Akari board.
AkariMount型The mounted Akari game and progress, native controls and cleanup handle.
AkariMountOptions型The initial Akari board, native progress, appearance and host event callbacks.
akariNeighbours関数Returns the orthogonally adjacent cells to a board position.
AkariPieces型A supported native Akari mark or piece appearance.
AkariProgress型The Akari constraint status of a partial board.
AkariPuzzle型A seeded Akari board with its verified solution and native difficulty tier.
AkariRating型How hard a board is, measured by solving it.
AkariSolve型A bounded Akari solve result: answer count, first solution, node work and whether the search completed.
akariVisible関数White squares visible from a cell, including itself, stopping at black squares and edges.
answerOf関数The whole grid as a cells code: what checkKazu takes as an answer.
boxedLayout関数Rows, columns and boxes; with diagonal, the two long diagonals as well.
Boxes型Where the boxes are on a Sudoku grid: how many rows and columns of cells each box holds.
boxOf関数The box a cell is in, numbered row-major from 0.
Cage型A cage: the cells in it and the sum of the numbers inside.
CAGE_LETTERS定数The letters that name a cage in a code: up to sixty-two cages.
cageOutline関数THE DASHED OUTLINE OF EVERY CAGE, as line segments in cell units: each cage drawn a little inside its own edge, the way a printed Killer Sudoku draws it, so a cage reads as a shape within the box rules rather than as one of them.
canReach関数Whether the remaining distinct digits can reach the target sum in the given slots.
checkAkari関数Checks a complete placement from the public rules, without consulting a stored answer.
checkCrossSums関数Checks exact run sums and distinct digits independently of a stored answer.
checkHeyawake関数Validate a Heyawake answer against the printed clues and complete native rules.
checkHitori関数Checks unshaded row and column duplicates, adjacent shades, and white connectivity.
checkJuosan関数Checks public rules directly, independently of the solver and stored answer.
checkKazu関数Whether an answer solves a puzzle: O(cells), no search, nothing remembered between calls.
checkLoop関数Checks all numbered cells, degree-two vertices, and one connected closed loop.
checkMasyu関数Validate a Masyu answer against the printed clues and complete native rules.
checkNurikabe関数Checks island areas and separation, the connected sea, and the ban on 2×2 sea blocks.
checkRegions関数Checks region connectivity and area without consulting a generated answer.
checkRipple関数Checks room permutations and the at-least-N-cell gap between equal N clues in a line.
checkRoomSpans関数Add unshaded straight-line room-span violations to the supplied error set.
checkShikaku関数A finished partition is checked against the rules, never against a stored answer.
checkYajilin関数Validate a Yajilin answer against the printed clues and complete native rules.
clearCell関数Empty a cell of its number and its pencil marks.
cluesOf関数Every clue a finished square makes true: what each side of it sees.
conflictsOf関数THE CELLS THAT BREAK A RULE RIGHT NOW, read from the rules alone: no answer is needed, so it works on any puzzle, and it names a mistake the moment it is made rather than when it is checked.
countKazuSolutions関数How many answers a puzzle has, up to limit (two by default, so "many" costs no more than "two"): 1 is a puzzle, 0 is a grid that cannot be finished, 2 is a guessing game.
CROSS_SUMS_GENERATION_ATTEMPTS定数The native CrossSums generation-attempt limit.
CROSS_SUMS_GENERATION_NODES定数The native CrossSums search-node budget.
CROSS_SUMS_LEAST_GENERATED_SIDE定数The minimum supported CrossSums board dimension for generation.
CROSS_SUMS_LEVELS定数How hard a puzzle is made, by what a person must do to solve it; see rateCrossSums.
CROSS_SUMS_MAX_ATTEMPTS定数The native CrossSums generation-attempt limit.
CROSS_SUMS_MAX_NODES定数The native CrossSums search-node budget.
CROSS_SUMS_MAX_SIDE定数The maximum supported CrossSums board dimension.
CROSS_SUMS_MIN_SIDE定数The minimum supported CrossSums board dimension.
CROSS_SUMS_PLAY_STYLE定数Scoped native CrossSums board and player CSS.
CROSS_SUMS_SIZES定数The sides on offer, counting the row and column of totals; any side from 5 to CROSS_SUMS_MAX_SIDE can be made.
CROSS_SUMS_STRINGS定数Native English and Japanese labels and announcements for CrossSums.
CrossSumsBoard型CrossSums dimensions and printed clues in their native row-major representation.
CrossSumsCell型A white digit cell or a black clue cell with optional across/down totals.
CrossSumsCheck型The CrossSums completion result and cells that violate its native rules.
CrossSumsDrawOptions型Current CrossSums marks or entries, selection, errors and native SVG appearance choices.
CrossSumsGame型The immutable CrossSums board, current entries or marks, undo history and assistance state.
CrossSumsLanguage型The native English or Japanese display language for CrossSums.
CrossSumsLevel型A native difficulty tier for generated CrossSums puzzles.
CrossSumsMaterial型A supported material of the native CrossSums board.
CrossSumsMount型The mounted CrossSums game and progress, native controls and cleanup handle.
CrossSumsMountOptions型The initial CrossSums board, native progress, appearance and host event callbacks.
CrossSumsPieces型A supported native CrossSums mark or piece appearance.
CrossSumsPuzzle型A seeded CrossSums board with its verified solution and native difficulty tier.
CrossSumsRating型How hard a board is, measured by solving it.
CrossSumsRun型One across or down digit run, its clue cell, constituent cells and target sum.
crossSumsRuns関数Read across and down digit runs with their clue cells and totals.
CrossSumsSolve型A bounded CrossSums solve result: answer count, first solution, node work and whether the search completed.
decodeAkari関数Decodes a bounded save after validating the board and each placement.
decodeCells関数".3.1" at a side of 2 → [0, 3, 0, 1], or null for a string that is not a grid of that size: the wrong length, a value past the side, a stray character.
decodeCrossSums関数Read a native saved CrossSums game, or null for invalid board data or progress.
decodeHeyawake関数Read a native saved Heyawake game, or null for invalid board data or progress.
decodeHitori関数Read a native saved Hitori game, or null for invalid board data or progress.
decodeJigsaw関数The cells and regions a Jigsaw's givens say, or null for a string that is not a Jigsaw of this side.
decodeJuosan関数Reads a bounded public save; malformed or incompatible data returns null.
decodeKiller関数The cells and cages a code says, or null for one that is not a whole, well-formed puzzle: every cell named to a cage, every cage used, and a sum for each.
decodeLoop関数Read a native saved Loop game, or null for invalid board data or progress.
decodeMasyu関数Read a native saved Masyu game, or null for invalid board data or progress.
decodeMoreOrLess関数Decode native Futoshiki numbers and less-than relations, or null for an invalid code.
decodeNotes関数The pencil marks a code says (each cell a bit mask, bit v for the number v), or null for a code that is not one for a grid of this side.
decodeNurikabe関数Read a native saved Nurikabe game, or null for invalid board data or progress.
decodeRegions関数Regions row-major, one letter each, or null for a string that is not that.
decodeRegionsGame関数Read a native saved Regions game, or null for invalid board data or progress.
decodeRipple関数Read a native saved Ripple game, or null for invalid board data or progress.
decodeRun関数The entries a run's code says, or null for a code that is not a run of this side.
decodeShikaku関数Read a native saved Shikaku game, or null for invalid board data or progress.
decodeSteps関数The grids a step log holds, each cells characters long, or null for a log that does not read as one.
decodeTowers関数The cells and clues a code says, or null for a string that is not a Towers puzzle of this size.
decodeYajilin関数Read a native saved Yajilin game, or null for invalid board data or progress.
drawAkari関数Draws the public clues and current bulbs as SVG.
drawCrossSums関数Render the CrossSums board and supplied current state as native SVG text.
drawHeyawake関数Render the Heyawake board and supplied current state as native SVG text.
drawJuosan関数Draws a public Juosan board as an SVG string.
drawLoop関数Draws public clues and selected loop edges as an SVG board.
drawRegions関数Render the Regions board and supplied current state as native SVG text.
drawRipple関数Render the Ripple board and supplied current state as native SVG text.
edgeVertices関数Read the two vertex indices at the ends of a native Loop edge.
EMPTY_CELL定数A GRID OF NUMBERS AS A STRING: for an address, a POST body, and a kept run.
encodeAkari関数Encodes only public clues and player placements.
encodeCells関数[0, 3, 0, 1] → ".3.1".
encodeCrossSums関数Encode the CrossSums board and current game as native resumable text.
encodeHeyawake関数Encode the Heyawake board and current game as native resumable text.
encodeHitori関数Versioned public clue and mark data; the generated answer is not saved.
encodeJigsaw関数A Jigsaw's givens: the cells, then the regions, one letter a cell.
encodeJuosan関数Serializes public clues, placements, and assisted status.
encodeKiller関数A Sum Cages puzzle's givens: the cells, then which cage each cell is in, then each cage's sum.
encodeLoop関数Encode the Loop board and current game as native resumable text.
encodeMasyu関数Encode the Masyu board and current game as native resumable text.
encodeMoreOrLess関数Encode grid numbers and less-than relations as the native Futoshiki givens code.
encodeNotes関数Pencil marks as a code: for each cell that has any, its index in base 36 (two characters) and its marks as one number in base 36 (four characters); nothing at all for a grid with none.
encodeNurikabe関数Encode the Nurikabe board and current game as native resumable text.
encodeRegions関数The region of every cell as a letter, a for the first region and so on: one character a cell.
encodeRegionsGame関数Encode the Regions board and current game as native resumable text.
encodeRipple関数Encode the Ripple board and current game as native resumable text.
encodeRun関数The entries of a run as its code.
encodeShikaku関数Versioned public puzzle and placement data, with no hidden answer.
encodeSteps関数THE STEPS OF A PUZZLE, written down so a scrubber has them when the puzzle is picked up again.
encodeTowers関数Encode grid numbers and four sides of visibility clues as native Skyscrapers givens.
encodeYajilin関数Encode the Yajilin board and current game as native resumable text.
enterCrossSums関数Apply the requested native CrossSums entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
enterNumber関数Write a number into a cell (0 empties it).
entryRegions関数Group connected cells carrying the same entry into candidate regions.
finishedCrossSums関数Whether this CrossSums game satisfies its complete native rules.
freshKazuSeed関数A new seed, from Math.random or the stream given: anywhere in the range.
gameConflicts関数The cells that break a rule now (conflictsOf).
generateAkari関数Makes a seeded board and proves it has one answer.
generateCrossSums関数Makes a seeded board of size squares a side (counting the row and column of totals) and proves it has one answer.
generateDiagonal関数A Diagonal Sudoku (Sudoku X): Sudoku with the two long diagonals as groups too.
generateHeyawake関数Generate a seeded Heyawake puzzle with a verified unique answer; unsupported inputs or exhausted attempts throw.
generateHitori関数Makes a seeded puzzle and proves its answer is the only one.
generateJigsaw関数A Jigsaw Sudoku of this side, level and seed: 5, 6, 7 or 9.
generateJuosan関数Makes an original small training puzzle and returns it only after uniqueness is proved.
generateKazu関数A puzzle of any of the six, from a seed: the one door.
generateLoop関数Makes a seeded puzzle and proves it has one answer.
generateMasyu関数Seeded original loop layouts; every output is accepted only after a completed uniqueness proof.
generateMoreOrLess関数A Futoshiki (More or Less) of this side, level and seed: 4, 5, 6 or 7.
generateNumberPlace関数A Sudoku (Number Place) of this side, level and seed: 4, 6, 9, 16 or 25.
generateNurikabe関数Seeded symmetries of original 5×5 layouts are returned only after the solver proves uniqueness.
generateRegions関数Makes a seeded puzzle and proves its answer is the only one.
generateRipple関数Builds a seeded block-room family and accepts it only after a bounded uniqueness proof.
generateShikaku関数Seeded rectangles packed into the board, one number each, with an independently counted, unique answer.
generateShikakuChallenge関数Generate a seeded Shikaku puzzle with a verified unique answer; unsupported inputs or exhausted attempts throw.
generateSumCages関数A Killer Sudoku (Sum Cages) of this side, level and seed: 6 or 9.
generateTowers関数A Skyscrapers (Towers) puzzle of this side, level and seed: 4, 5, 6 or 7.
generateYajilin関数Seeded original 5×5 families, accepted only after a completed uniqueness proof.
HEYAWAKE_GENERATOR_MOST_CELLS定数The maximum number of cells accepted by the Heyawake generator.
HEYAWAKE_LEVELS定数The native Heyawake generation difficulty tiers.
HEYAWAKE_MOST_ATTEMPTS定数The native Heyawake generation-attempt limit.
HEYAWAKE_MOST_NODES定数The native Heyawake search-node budget.
HEYAWAKE_MOST_SIDE定数The maximum supported Heyawake board dimension.
HEYAWAKE_PLAY_STYLE定数Scoped native Heyawake board and player CSS.
HeyawakeAppearance型Language, material and marks for a native Heyawake board.
HeyawakeBoard型Heyawake dimensions and printed clues in their native row-major representation.
heyawakeCells関数Read room cells, or null for a room outside this board.
HeyawakeCheck型The Heyawake completion result and cells that violate its native rules.
HeyawakeDrawOptions型Current Heyawake marks or entries, selection, errors and native SVG appearance choices.
heyawakeFinished関数Whether this Heyawake game satisfies its complete native rules.
HeyawakeGame型The immutable Heyawake board, current entries or marks, undo history and assistance state.
HeyawakeLevel型A native difficulty tier for generated Heyawake puzzles.
HeyawakeMount型The mounted Heyawake game and progress, native controls and cleanup handle.
HeyawakeMountOptions型The initial Heyawake board, native progress, appearance and host event callbacks.
heyawakeNeighbours関数Read orthogonally adjacent Heyawake cells.
HeyawakePuzzle型A seeded Heyawake board with its verified solution and native difficulty tier.
HeyawakeRoom型A rectangular room and its optional required black-cell count.
HeyawakeSolve型A bounded Heyawake solve result: answer count, first solution, node work and whether the search completed.
heyawakeWords関数Read the native English or Japanese Heyawake labels.
hintAkari関数Returns a missing bulb, or an extra bulb to remove, only after uniqueness is proved.
hintCrossSums関数Find a native CrossSums hint, or null when no actionable hint is available.
hintHeyawake関数Find a native Heyawake hint, or null when no actionable hint is available.
hintHitori関数Gives one next shade in the unique minimal solution, if uniqueness was proved.
hintJuosan関数Returns one next mark only when the public clues prove a unique answer.
hintKazu関数The next cell a person could fill in, and why (see KazuHint).
hintLoop関数Find a native Loop hint, or null when no actionable hint is available.
hintMasyu関数Find a native Masyu hint, or null when no actionable hint is available.
hintNurikabe関数Find a native Nurikabe hint, or null when no actionable hint is available.
hintRegions関数Find a native Regions hint, or null when no actionable hint is available.
hintRipple関数Offers a cell only when the current public entries leave one proved completion.
hintShikaku関数A rectangle is offered only when the remaining partition has one proved answer.
hintYajilin関数Find a native Yajilin hint, or null when no actionable hint is available.
HITORI_LEAST_SIDE定数The minimum supported Hitori board dimension.
HITORI_LEVELS定数How hard a puzzle is made, by what a person must do to solve it; see rateHitori.
HITORI_MAX_NODES定数The native Hitori search-node budget.
HITORI_MOST_ATTEMPTS定数The native Hitori generation-attempt limit.
HITORI_MOST_SIDE定数The maximum supported Hitori board dimension.
HITORI_SIZES定数The sides on offer; any side from 4 to HITORI_MOST_SIDE is a board isHitoriBoard takes.
HitoriBoard型Hitori dimensions and printed clues in their native row-major representation.
HitoriGame型The immutable Hitori board, current entries or marks, undo history and assistance state.
HitoriLevel型A native difficulty tier for generated Hitori puzzles.
hitoriNeighbors関数Read orthogonally adjacent cells on a square Hitori board.
HitoriPuzzle型A seeded Hitori board with its verified solution and native difficulty tier.
HitoriRating型How hard a board is, measured by solving it.
HitoriSolve型A bounded Hitori solve result: answer count, first solution, node work and whether the search completed.
isAkariBoard関数Validates dimensions and the three public square kinds.
isCrossSumsBoard関数Whether the value has valid native CrossSums dimensions, clues and data.
isHeyawakeBoard関数Whether the value has valid native Heyawake dimensions, clues and data.
isHitoriBoard関数Whether the value has valid native Hitori dimensions, clues and data.
isJuosanBoard関数Whether territories partition a bounded board and each territory is connected.
isKazuGivens関数Whether a puzzle's givens are a well-formed puzzle of that kind and side at all (a Jigsaw's regions sound, every code readable).
isKazuKind関数Whether a value is one of the six keys.
isKazuLevel関数Whether a value is one of the three levels.
isKazuSeed関数Whether a value is a seed this package takes: a whole number from 1 to KAZU_SEED_MOST.
isKazuSize関数Whether this puzzle can be made at this side.
isLoopBoard関数Whether the value has valid native Loop dimensions, clues and data.
isMasyuBoard関数Whether the value has valid native Masyu dimensions, clues and data.
isNurikabeBoard関数Whether the value has valid native Nurikabe dimensions, clues and data.
isPrinted関数Whether a cell was printed with its number: it never changes.
isRegionsBoard関数Whether the value has valid native Regions dimensions, clues and data.
isRippleBoard関数Whether the value has valid native Ripple dimensions, clues and data.
isShikakuBoard関数Whether dimensions and area clues describe a possible partition.
isSolved関数Whether the grid is full and right, by the rules alone (checkKazu): every puzzle has exactly one answer, so a grid that keeps every rule IS that answer.
isYajilinBoard関数Whether the value has valid native Yajilin dimensions, clues and data.
JUOSAN_LEVELS定数The native Juosan generation difficulty tiers.
JUOSAN_MOST_ATTEMPTS定数The native Juosan generation-attempt limit.
JUOSAN_MOST_NODES定数The native Juosan search-node budget.
JUOSAN_MOST_SIDE定数The maximum supported Juosan board dimension.
JUOSAN_PLAY_STYLE定数Scoped native Juosan board and player CSS.
JUOSAN_STRINGS定数Native English and Japanese labels and announcements for Juosan.
JuosanBoard型Juosan dimensions and printed clues in their native row-major representation.
JuosanCheck型The Juosan completion result and cells that violate its native rules.
JuosanDrawOptions型Current Juosan marks or entries, selection, errors and native SVG appearance choices.
juosanFinished関数Whether every cell is filled and the independent checker accepts the board.
JuosanGame型The immutable Juosan board, current entries or marks, undo history and assistance state.
JuosanLanguage型The native English or Japanese display language for Juosan.
JuosanLevel型A native difficulty tier for generated Juosan puzzles.
JuosanMark型A blank, horizontal or vertical mark in a Juosan cell.
JuosanMaterial型A supported material of the native Juosan board.
JuosanMount型The mounted Juosan game and progress, native controls and cleanup handle.
JuosanMountOptions型The initial Juosan board, native progress, appearance and host event callbacks.
JuosanPieces型A supported native Juosan mark or piece appearance.
JuosanPuzzle型A seeded Juosan board with its verified solution and native difficulty tier.
JuosanSolve型A bounded Juosan solve result: answer count, first solution, node work and whether the search completed.
JuosanTerritory型A territory is a list of zero-based cell indexes and an absolute orientation difference.
juosanTerritoryAt関数Returns the index of the territory containing a cell, or -1 when absent.
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.
KAZU_KIND_OF_SITE_KIND定数The names itsutsu.com gave the six in its code, to the keys here: what a site's stored kind becomes.
KAZU_KINDS定数THE SIX PUZZLES, and what each offers: the keys, the sizes and the levels.
KAZU_LEVELS定数How hard a puzzle is made: what the solver needed.
KAZU_SEED_MOST定数The most a seed can be: a whole number from 1 to 2³¹ − 1, so it travels in an address as a plain integer.
KAZU_SPECS定数Supported sizes, native default size and givens-code limits for each number-grid kind.
KAZU_STEPS_KEPT定数How many grids a step log keeps: the newest, so a long puzzle's log has a ceiling.
KazuCheck型The verdict on a submitted answer: { ok: true }, or { ok: false, reason } in the words the site has always used.
kazuClockText関数A time taken, as a clock shows it: m:ss, and h:mm:ss past an hour.
KazuGame型A PUZZLE IN PLAY, as pure functions: what has been written, the pencil marks, and how to take a step back.
KazuGameOptions型Optional entries and pencil-note masks to restore when creating a native number-grid game.
KazuGivens型WHAT A PUZZLE WAS PRINTED WITH, read from its givens code: the printed cells, and for a Jigsaw its regions, for Sum Cages its cages, for More or Less its marks, for Towers its clues.
kazuGuessDepth関数How many guesses, each followed by everything reasoning then finds, a person needs to finish the puzzle: 0 when reasoning alone finishes it (easy), 1 when one guess does (medium), more when more (hard); Infinity when there is no answer.
kazuHash関数A short fingerprint of a puzzle's givens (FNV-1a, eight hex characters): the same puzzle, however it was kept, has the same one.
KazuHint型A HINT: the next cell a person could fill in by looking, and why.
KazuKind型One of the six native number-grid puzzle kinds.
KazuLevel型One of the native easy, medium or hard generation tiers.
kazuProgress関数How far along it is: cells with a number (printed or written) out of all of them.
KazuPuzzle型One puzzle, made from a seed or read back from its codes.
KazuSpec型What one puzzle offers.
layoutOfGivens関数The groups that must each hold every number once, for the four kinds made of groups; null for More or Less and Towers, which only have rows and columns.
lineFrom関数The cells a clue looks along, nearest first: the clue at at on the top looks down column at, on the bottom up it, on the left along row at to the right, on the right along it to the left.
LOOP_LEVELS定数How hard a puzzle is made, by what a person must do to solve it; see rateLoop.
LOOP_MOST_ATTEMPTS定数The native Loop generation-attempt limit.
LOOP_MOST_NODES定数The native Loop search-node budget.
LOOP_MOST_SIDE定数The maximum supported Loop board dimension.
LOOP_SIZES定数The sides on offer for a square board; any side from 2 to LOOP_MOST_SIDE can be made.
LoopBoard型Loop dimensions and printed clues in their native row-major representation.
loopCellEdges関数Read the four edges around a cell, or null for a cell outside the board.
LoopCheck型The Loop completion result and cells that violate its native rules.
LoopDrawOptions型Current Loop marks or entries, selection, errors and native SVG appearance choices.
loopEdgeCount関数An edge index is horizontal row-major first, then vertical row-major.
loopFinished関数Whether this Loop game satisfies its complete native rules.
LoopGame型The immutable Loop board, current entries or marks, undo history and assistance state.
loopHorizontalCount関数Count horizontal edges in the Loop board’s native edge numbering.
LoopLanguage型The native English or Japanese display language for Loop.
LoopLevel型A native difficulty tier for generated Loop puzzles.
LoopMaterial型A supported material of the native Loop board.
LoopMount型The mounted Loop game and progress, native controls and cleanup handle.
LoopMountOptions型The initial Loop board, native progress, appearance and host event callbacks.
LoopProgress型The Loop constraint status of a partial board.
LoopPuzzle型A seeded Loop board with its verified solution and native difficulty tier.
LoopRating型How hard a board is, measured by solving it.
LoopSolve型A bounded Loop solve result: answer count, first solution, node work and whether the search completed.
loopVertexEdges関数Read edges meeting a native Loop vertex.
Mark型A mark: the cell at less holds a smaller number than the cell at more.
markNurikabeSea関数Apply the requested native Nurikabe entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
MASYU_NODE_BUDGET定数The native Masyu search-node budget.
MASYU_SIZES定数The supported Masyu board sizes.
MasyuBoard型Masyu dimensions and printed clues in their native row-major representation.
masyuCellCount関数Count cells in a Masyu board.
MasyuCheck型The Masyu completion result and cells that violate its native rules.
MasyuDrawOptions型Current Masyu marks or entries, selection, errors and native SVG appearance choices.
masyuEdgeCount関数Count native Masyu edges.
masyuFinished関数Whether this Masyu game satisfies its complete native rules.
MasyuGame型The immutable Masyu board, current entries or marks, undo history and assistance state.
MasyuMount型The mounted Masyu game and progress, native controls and cleanup handle.
MasyuMountOptions型The initial Masyu board, native progress, appearance and host event callbacks.
masyuNeighbors関数Read adjacent Masyu cells with the joining edge and direction.
MasyuPuzzle型A seeded Masyu board with its verified solution.
MasyuSolve型A bounded Masyu solve result: answer count, first solution, node work and whether the search completed.
mountAkari関数Mounts the player in a host element; call destroy when the host is removed.
mountCrossSums関数Mount the native CrossSums player in a host element and return its cleanup and control handle.
mountHeyawake関数Mount the native Heyawake player in a host element and return its cleanup and control handle.
mountJuosan関数Mounts a touch, mouse, and keyboard player into an existing page element.
mountLoop関数Mounts an accessible dot-and-edge loop player in the given host element.
mountRipple関数Mount the native Ripple player in a host element and return its cleanup and control handle.
neighbours関数The cells sharing an edge with index.
newAkari関数Starts a game with only its public board data.
newCrossSums関数Create the initial immutable CrossSums game from a valid board.
newHeyawake関数Create the initial immutable Heyawake game from a valid board.
newHitori関数Create the initial immutable Hitori game from a valid board.
newJuosan関数Starts a game with a copy of its public board and no generated answer.
newKazuGame関数A game of a puzzle, or null for givens that are not a puzzle of that kind and side.
newLoop関数Create the initial immutable Loop game from a valid board.
newMasyu関数Create the initial immutable Masyu game from a valid board.
newNurikabe関数Create the initial immutable Nurikabe game from a valid board.
newRegions関数Create the initial immutable Regions game from a valid board.
newRipple関数Create the initial immutable Ripple game from a valid board.
newShikaku関数Begin with a copy of just the public clues; a generated answer is never kept in play.
newYajilin関数Create the initial immutable Yajilin game from a valid board.
NO_MARK定数The native code character for an absent Futoshiki relation.
noClues関数Create empty visibility clues on all four sides of a square grid.
notesOf関数Every value of a pencil-mark mask, smallest first.
numberCounts関数The numbers 1 up to the side, each with how many of it are on the grid: a pad greys a number that is all placed.
NURIKABE_MAX_NODES定数The native Nurikabe search-node budget.
NURIKABE_SIZES定数The supported Nurikabe board sizes.
NurikabeBoard型Nurikabe dimensions and printed clues in their native row-major representation.
NurikabeGame型The immutable Nurikabe board, current entries or marks, undo history and assistance state.
nurikabeNeighbors関数Read orthogonally adjacent cells on a square Nurikabe board.
NurikabePuzzle型A seeded Nurikabe board with its verified solution.
NurikabeSolve型A bounded Nurikabe solve result: answer count, first solution, node work and whether the search completed.
placeShikaku関数Place a rectangle, replacing any it touches.
progressAkari関数Reports immediate contradictions while allowing required clues to remain unsatisfied during play.
progressCrossSums関数Allows unfinished runs while flagging duplicate digits and impossible remaining totals.
progressLoop関数Reports overfilled clues and branched vertices during play without requiring a finished loop.
progressRipple関数Partial progress check; missing entries are allowed, but impossible room/ripple pairs are flagged.
Random型A number in [0, 1), like Math.random, from a stream a seed fixes.
rateAkari関数Rates a board by solving it as a person would: with the rules alone (depth 0), then with one supposition at a time (depth 1), and anything beyond that is depth 2.
rateCrossSums関数Rates a board with one answer by solving it: with the single-run rules, with the digit-that-must-appear rule, then by supposing.
rateHitori関数Rates a board with one answer by solving it: with the plain rules, with the whites-stay-together rule, then by supposing.
rateLoop関数Rates a board with one answer by solving it as a person would: with the rules, then by supposing one edge at a time.
rateRegions関数Rates a board with one answer by solving it as a person would: with the rules, then by supposing one number at a time.
rateShikaku関数Rates a board with one answer by solving it with the first rule, with the first two, with all three, then by supposing.
readGivens関数The givens of a puzzle, or null for a code that is not one of that kind and side.
REGIONS_GENERATOR_MOST_CELLS定数The maximum number of cells accepted by the Regions generator.
REGIONS_LEAST_GENERATED_SIDE定数The minimum supported Regions board dimension for generation.
REGIONS_LEVELS定数How hard a puzzle is made, by what a person must do to solve it; see rateRegions.
REGIONS_MOST_ATTEMPTS定数The native Regions generation-attempt limit.
REGIONS_MOST_NODES定数The native Regions search-node budget.
REGIONS_MOST_SIDE定数The maximum supported Regions board dimension.
REGIONS_SIZES定数The sides on offer for a square board; any side from 4 to REGIONS_MOST_SIDE can be made.
regionsAreSound関数Whether region divides a size×size grid into size regions of size cells each, every one of them joined edge to edge.
RegionsBoard型Regions dimensions and printed clues in their native row-major representation.
RegionsCheck型The Regions completion result and cells that violate its native rules.
RegionsDrawOptions型Current Regions marks or entries, selection, errors and native SVG appearance choices.
regionsFinished関数Whether this Regions game satisfies its complete native rules.
RegionsGame型The immutable Regions board, current entries or marks, undo history and assistance state.
RegionsLevel型A native difficulty tier for generated Regions puzzles.
regionsNeighbours関数Read orthogonally adjacent Regions cells.
RegionsPuzzle型A seeded Regions board with its verified solution and native difficulty tier.
RegionsRating型How hard a board is, measured by solving it.
RegionsSolve型A bounded Regions solve result: answer count, first solution, node work and whether the search completed.
removeShikaku関数Remove the rectangle containing a cell.
restartCrossSums関数Return the CrossSums game reset to its initial entries or marks.
restartHeyawake関数Return the Heyawake game reset to its initial entries or marks.
restartHitori関数Return the Hitori game reset to its initial entries or marks.
restartJuosan関数Clears the board while retaining whether the player used a hint.
restartKazu関数Start again: every entry and pencil mark gone, and nothing to undo.
restartMasyu関数Return the Masyu game reset to its initial entries or marks.
restartNurikabe関数Return the Nurikabe game reset to its initial entries or marks.
restartRegions関数Return the Regions game reset to its initial entries or marks.
restartYajilin関数Return the Yajilin game reset to its initial entries or marks.
RIPPLE_MAX_ATTEMPTS定数The native Ripple generation-attempt limit.
RIPPLE_MAX_NODES定数The native Ripple search-node budget.
RIPPLE_MAX_SIDE定数The maximum supported Ripple board dimension.
RIPPLE_MIN_SIDE定数The minimum supported Ripple board dimension.
RIPPLE_PLAY_STYLE定数Scoped native Ripple board and player CSS.
RIPPLE_STRINGS定数Native English and Japanese labels and announcements for Ripple.
RippleBoard型Ripple dimensions and printed clues in their native row-major representation.
RippleCheck型The Ripple completion result and cells that violate its native rules.
RippleDrawOptions型Current Ripple marks or entries, selection, errors and native SVG appearance choices.
rippleFinished関数Whether this Ripple game satisfies its complete native rules.
RippleGame型The immutable Ripple board, current entries or marks, undo history and assistance state.
RippleLanguage型The native English or Japanese display language for Ripple.
RippleMaterial型A supported material of the native Ripple board.
RippleMount型The mounted Ripple game and progress, native controls and cleanup handle.
RippleMountOptions型The initial Ripple board, native progress, appearance and host event callbacks.
RipplePieces型A supported native Ripple mark or piece appearance.
RipplePuzzle型A seeded Ripple board with its verified solution.
rippleRoomSizes関数Read the size of each room in a Ripple Effect board.
RippleSolve型A bounded Ripple solve result: answer count, first solution, node work and whether the search completed.
roomForCell関数Read the containing room index for each Heyawake cell.
seededRandom関数A stream of numbers in [0, 1) fixed by a seed.
Segment型A line segment in cell units: where one part of a cage's dashed outline runs.
setHeyawakeCell関数Apply the requested native Heyawake entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
setJuosanMark関数Writes a mark and records the previous state; invalid or unchanged moves are ignored.
setRegionsCell関数Apply the requested native Regions entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
setRippleValue関数Apply the requested native Ripple entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
shadeHitori関数Apply the requested native Hitori entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
SHIKAKU_CHALLENGE_PACKS定数Three short, named challenge routes using the regular seeded unique-puzzle generator.
SHIKAKU_LEVELS定数How hard a puzzle is made, by what a person must do to solve it; see rateShikaku.
SHIKAKU_MOST_ATTEMPTS定数The native Shikaku generation-attempt limit.
SHIKAKU_MOST_NODES定数The native Shikaku search-node budget.
SHIKAKU_MOST_SIDE定数Bounds keep custom boards and searches finite.
SHIKAKU_SIZES定数The sides on offer for a square board; any side from 2 to SHIKAKU_MOST_SIDE can be made.
ShikakuBoard型One area clue per rectangle; zero is an unnumbered cell.
shikakuCandidates関数All legal rectangles for a numbered cell, in a stable order.
shikakuCells関数Cells of a bounded rectangle, or null for invalid coordinates.
ShikakuChallenge型The named route, board shape, difficulty and seed of one Shikaku challenge.
ShikakuChallengePuzzle型A named Shikaku challenge paired with its generated unique puzzle.
ShikakuCheck型The Shikaku completion result and cells that violate its native rules.
shikakuFinished関数Whether this Shikaku game satisfies its complete native rules.
ShikakuGame型The immutable Shikaku board, current entries or marks, undo history and assistance state.
ShikakuLevel型A native difficulty tier for generated Shikaku puzzles.
ShikakuPackKey型One of the square, wide or tall native Shikaku challenge routes.
ShikakuPuzzle型A seeded Shikaku board with its verified solution and native difficulty tier.
ShikakuRating型How hard a board is, measured by solving it.
ShikakuRectangle型A rectangle uses zero-based column and row coordinates.
ShikakuSolve型A bounded Shikaku solve result: answer count, first solution, node work and whether the search completed.
shuffled関数A copy of the list in a random order (Fisher–Yates, from the end); the list given is left alone.
solveAkari関数Bounded constraint search over the rules in akariLogic.ts; a stopped proof is always marked incomplete.
solveCrossSums関数Bounded exact counter over across and down runs; an interrupted search never proves uniqueness.
solveHeyawake関数Search for Heyawake answers up to the solution and node limits; completion distinguishes a proved result from exhausted work.
solveHitori関数Counts distinct minimal shade patterns: an answer shades only squares that settle a duplicate, so extra shades are never a second answer.
solveJuosan関数Counts labeled solutions up to a limit; complete distinguishes exhaustion from cutoff.
solveKazu関数The one answer a puzzle's givens allow, as a cells code, or null when they allow none, more than one, or the search ran past budget steps (Sudoku, Jigsaw, Diagonal and Sum Cages).
solveLoop関数Counts loop solutions with the pruning in loopLogic.ts under explicit work bounds.
solveMasyu関数Counts distinct single loops with local pearl rules; budget stops never claim a proof.
solveNurikabe関数Counts valid island placements and checks the remaining cells as the sea under a finite budget.
solveRegions関数Counts completed partitions.
solveRipple関数Counts rule-valid fillings within an explicit node budget.
solveShikaku関数Exact cover over squares.
solveYajilin関数Counts public shade patterns whose remaining cells form the single required loop.
stepEntry関数The number a tap on the chosen cell puts in it: one more, and after the largest the cell empties, and then it starts again at 1.
symbolOf関数How a value is written, in a code and on a cell: 1–9, then A–P.
toggleAkari関数Toggles a bulb on a white square and keeps one prior turn for undo.
toggleLoop関数Apply the requested native Loop entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
toggleMasyuEdge関数Apply the requested native Masyu entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
toggleNote関数Turn the pencil mark value on or off in a cell.
toggleRippleNote関数Apply the requested native Ripple entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
toggleYajilinEdge関数Apply the requested native Yajilin entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
toggleYajilinShade関数Apply the requested native Yajilin entry or mark to a new immutable game; invalid or fixed targets stay unchanged.
TOWER_SIDES定数Towers (Skyscrapers) as a string: the cells, then the clues around the edge.
TowerClues型Each side's clues, in reading order along it; 0 where there is none.
TowerSide型The top, bottom, left or right side of Skyscrapers visibility clues.
towersSeen関数How many towers show looking along heights from its first end: each one taller than every one before it.
undoAkari関数Restores the last bulb placement.
undoCrossSums関数Return the CrossSums game with its previous marks or entries restored, or unchanged when there is no undo history.
undoHeyawake関数Return the Heyawake game with its previous marks or entries restored, or unchanged when there is no undo history.
undoHitori関数Return the Hitori game with its previous marks or entries restored, or unchanged when there is no undo history.
undoJuosan関数Restores the preceding mark state, if one exists.
undoKazu関数Take back the last change.
undoLoop関数Return the Loop game with its previous marks or entries restored, or unchanged when there is no undo history.
undoMasyu関数Return the Masyu game with its previous marks or entries restored, or unchanged when there is no undo history.
undoNurikabe関数Return the Nurikabe game with its previous marks or entries restored, or unchanged when there is no undo history.
undoRegions関数Return the Regions game with its previous marks or entries restored, or unchanged when there is no undo history.
undoRipple関数Return the Ripple game with its previous marks or entries restored, or unchanged when there is no undo history.
undoShikaku関数Return the Shikaku game with its previous marks or entries restored, or unchanged when there is no undo history.
undoYajilin関数Return the Yajilin game with its previous marks or entries restored, or unchanged when there is no undo history.
valueOfSymbol関数The value a symbol names, or 0 for one that is not 1–9 or A–P (either case).
valuesOf関数The whole grid as it stands: the printed numbers, and the player's where nothing is printed.
VERSION定数The package's version.
YAJILIN_NODE_BUDGET定数The native Yajilin search-node budget.
YAJILIN_SIZES定数The supported Yajilin board sizes.
YajilinBoard型Yajilin dimensions and printed clues in their native row-major representation.
YajilinCheck型The Yajilin completion result and cells that violate its native rules.
YajilinClue型An arrow direction and the required number of shaded cells in its ray.
YajilinDirection型The direction an arrow clue looks along a row or column.
YajilinDrawOptions型Current Yajilin marks or entries, selection, errors and native SVG appearance choices.
yajilinEdgeCount関数Count native Yajilin edges.
YajilinGame型The immutable Yajilin board, current entries or marks, undo history and assistance state.
YajilinMount型The mounted Yajilin game and progress, native controls and cleanup handle.
YajilinMountOptions型The initial Yajilin board, native progress, appearance and host event callbacks.
yajilinNeighbors関数Read adjacent Yajilin cells and the joining edge.
YajilinPuzzle型A seeded Yajilin board with its verified solution.
yajilinRay関数Read cells in the arrow’s indicated direction, excluding its own clue cell.
YajilinSolution型The solved Yajilin shading and loop edges.
YajilinSolve型A bounded Yajilin solve result: answer count, first solution, node work and whether the search completed.

ソースを見るGitHub で編集@johnmorrisdotca/kazu 2.1.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。