0.0.6 • Published 3 years ago

@sanschristo/sudoku-solver v0.0.6

Weekly downloads
-
License
GPL-3.0-or-later
Repository
github
Last release
3 years ago

Sudoku Solver

Sudoku Solver is a simple, brute force algorithm for solving sudoku puzzles using backtracking.

Installation

Use npm to install the dependencies:

npm i @sanschristo/sudoku-solver

Usage

import { Board, Game } from '@sanschristo/sudoku-solver';

const board: Board = [
    [0, 7, 0,  2, 0, 1,  0, 5, 0],
    [0, 0, 0,  0, 4, 0,  0, 0, 0],
    [9, 0, 8,  0, 0, 0,  1, 0, 4],

    [6, 0, 4,  0, 0, 0,  2, 0, 3],
    [0, 9, 0,  0, 0, 0,  0, 6, 0],
    [0, 3, 2,  0, 0, 0,  7, 1, 0],

    [8, 0, 0,  9, 0, 7,  0, 0, 2],
    [0, 0, 0,  1, 0, 6,  0, 0, 0],
    [0, 0, 0,  0, 8, 0,  0, 0, 0]
];

const game = new Game(board);

game.solve();
game.logBoard();
0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago