1.1.8 • Published 8 months ago

sudoku-toolbox v1.1.8

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Sudoku toolbox

Install

yarn add sudoku-toolbox

Usage

import { generateSudoku } from "sudoku-toolbox";

const sudoku = generateSudoku();

const { puzzle, solution, areas, difficulty } = sudoku;

Details

The function generateSudoku takes an optional parameter difficulty which must be between easy, hard, medium and expert.

import { generateSudoku } from "sudoku-toolbox";

const sudoku = generateSudoku("easy");

By default, the numbers of cells to remove for each difficulty are:

{
    "easy": 30,
    "medium": 40,
    "hard": 50,
    "expert": 60,
}

From experience, above 67 or 68 numbers to remove, the program begins to struggle and is a bit slow and it is possible that it can hang forever above 70.

In an upcoming version, it will just raise an error after a timeout.

1.1.8

8 months ago

1.1.7

8 months ago

1.1.6

8 months ago

1.1.5

8 months ago

1.1.4

8 months ago

1.1.3

8 months ago

1.1.2

8 months ago

1.1.1

8 months ago

1.1.0

8 months ago

1.0.9

8 months ago

1.0.8

8 months ago

1.0.5

8 months ago

1.0.4

8 months ago

1.0.3

8 months ago

1.0.1

8 months ago

1.0.0

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.3

8 months ago

0.0.1

8 months ago