Skip to the content

Kazu数

Generate checked Sudoku and logic puzzles, read native rules and hints, and draw or embed playable boards.

Kazu is the Japanese word 数 for number. About the name

Contents

Reference · Number-grid SVG

KazuNametype

WHAT EACH PUZZLE IS CALLED, and what it is, in English and Japanese: the name a player searches for, its Japanese name, a line saying how it is played, and a few lines of rules. Plain data, for a page that lists the puzzles (a chooser, a rules page); strings.ts has the words a playable board says.

The English names are the ones players search for: Sudoku, Killer Sudoku, Futoshiki, Skyscrapers. 数独 is Nikoli's mark in Japan, so Sudoku's Japanese name here is ナンプレ (Number Place, the puzzle's own original name, and the word Japanese publishers use); the others keep names of their own. The keys the package uses are number-place, sum-cages, more-or-less, towers: what each one is, not somebody's trademark.

Import it

import type { KazuName } from "@johnmorrisdotca/kazu/draw";

Definition

type KazuName = {
    en: string;
    ja: string;
    alsoKnownAs: readonly string[];
    tagline: {
        en: string;
        ja: string;
    };
    rules: {
        en: readonly string[];
        ja: readonly string[];
    };
    origin: {
        en: string;
        ja: string;
    };
};

Members

NameTypeDescription
enstring

The name players search for.

jastring

The Japanese name.

alsoKnownAsreadonly string[]

Other names the same puzzle goes by.

tagline{ en: string; ja: string; }

How it is played, in a line.

rules{ en: readonly string[]; ja: readonly string[]; }

The rules, a few lines each.

origin{ en: string; ja: string; }

Where it comes from, in a sentence.

Examples

import type { KazuName } from "@johnmorrisdotca/kazu/draw";
import { KAZU_NAMES } from "@johnmorrisdotca/kazu/draw";

const value: KazuName = KAZU_NAMES["number-place"];
console.log(value);
{
  en: 'Sudoku',
  ja: 'ナンプレ',
  alsoKnownAs: [ 'Number Place', 'Nanpure' ],
  tagline: {
    en: 'Fill the grid so every row, column and box holds each number once.',
    ja: 'どの行、列、ブロックにも、同じ数字が一つずつ入るように、盤を埋めます。'
  },
  rules: {
    en: [
      'Fill every empty cell with a number from 1 up to the side of the grid, so that each row, each column and each box holds every number exactly once.',
      'The numbers already printed are the givens. They stay where they are, and every puzzle has exactly one answer that fits them.',
      'The 16×16 Giant has sixteen symbols: 1 to 9, then A to G for 10 to 16. The 25×25 Colossus has twenty-five: A to P for 10 to 25.',
      'Easy yields to reasoning alone: every cell can be found from what is already there. Medium and hard ask you to try something and see.'
    ],
    ja: [
      '空いているマスに、1から盤の一辺の数までの数字を入れます。どの行、列、ブロックにも、同じ数字が一つずつ入ります。',
      '最初から書かれている数字はそのままです。どの問題も、答えはちょうど一つだけです。',
      '16×16の「特大」は、1から9までの数字に、10から16までを表すAからGを足した16種類を使います。25×25の「巨大」は、10から25までを表すAからPまでを使う25種類です。',
      'やさしい問題は、推理だけで全部のマスが決まります。ふつうとむずかしい問題では、試してみる場面があります。'
    ]
  },
  origin: {
    en: "Howard Garns's Number Place, printed by Dell in 1979; Nikoli took it to Japan in 1984 and named it Sudoku.",
    ja: '1979年にデル社が載せた、ハワード・ガーンズの「ナンバー・プレース」です。1984年にニコリが日本に紹介し、数独と名づけました。'
  }
}

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kazu 2.1.0.