@jneal-codes/sudoku
TypeScript icon, indicating that this package has built-in type declarations

5.0.2 • Public • Published

@jneal-codes/sudoku

This is an extremely lightweight sudoku game engine written in TypeScript.

Installation

npm install @jneal-codes/sudoku

Usage

import { createSudokuGame, SudokuDifficulty } from '@jneal-codes/sudoku';

const game = createSudokuGame(SudokuDifficulty.EASY);

console.log(game.solution);

// [
//   [3, 1, 5, 8, 2, 7, 9, 4, 6],
//   [4, 6, 8, 9, 1, 5, 7, 3, 2],
//   [7, 2, 9, 3, 4, 6, 5, 1, 8],
//   [9, 4, 6, 5, 3, 8, 1, 2, 7],
//   [5, 7, 1, 6, 9, 2, 4, 8, 3],
//   [8, 3, 2, 1, 7, 4, 6, 9, 5],
//   [6, 9, 3, 2, 5, 1, 8, 7, 4],
//   [2, 5, 7, 4, 8, 9, 3, 6, 1],
//   [1, 8, 4, 7, 6, 3, 2, 5, 9],
// ]

Readme

Keywords

none

Package Sidebar

Install

npm i @jneal-codes/sudoku

Weekly Downloads

8

Version

5.0.2

License

none

Unpacked Size

11.7 kB

Total Files

9

Last publish

Collaborators

  • jtneal