本文へ移動

Kazu数

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

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

目次

リファレンス · 数字パズルのエンジン

TOWER_SIDES定数

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

Towers (Skyscrapers) as a string: the cells, then the clues around the edge.

The cells come first, row-major, as every number grid is written (. for empty; most puzzles print none). Then one character for every place a clue can stand outside the square, four sides of size: along the top left to right, along the bottom left to right, down the left top to bottom, down the right top to bottom. A digit is how many towers can be seen from there; . is no clue. A 7×7 is 49 + 28 characters.

インポート

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

定義

const TOWER_SIDES: readonly ["top", "bottom", "left", "right"] = ["top", "bottom", "left", "right"] as const

例

import { TOWER_SIDES } from "@johnmorrisdotca/kazu";
console.log(TOWER_SIDES);
[ 'top', 'bottom', 'left', 'right' ]

出力(このページを作ったときに実行した結果)

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

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