sudoku-pro 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +28 -2
  2. package/package.json +12 -10
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # sudoku-pro: Sudoku Generator and Sudoku Solver
2
2
 
3
- sudoku-pro is a Node.js package that provides functionalities to generate, solve, and print Sudoku puzzles of varying difficulty levels using the backtracking algorithm. It offers an easy-to-use interface to create Sudoku puzzles for entertainment and educational purposes. The main idea behind this package was to test the potential of the backtracking algorithm for generating Sudoku puzzles of different difficulty levels, making it suitable for both recreational and educational purposes.
3
+ sudoku-pro is a Node.js package that provides functionalities to generate, solve, and print Sudoku puzzles of varying difficulty levels using the backtracking algorithm. It offers an easy-to-use interface to create Sudoku puzzles for both recreational and educational purposes.
4
4
 
5
5
  ## Installation
6
6
 
@@ -16,4 +16,30 @@ npm i sudoku-pro
16
16
  npm run easy
17
17
  npm run medium
18
18
  npm run hard
19
- ```
19
+ ```
20
+
21
+ ## Example: How to use the functions in your applications
22
+
23
+ ```javascript
24
+ // Import the module
25
+ const { generateSudoku, printSudoku, solveSudoku } = require("sudoku-pro");
26
+
27
+ // Get the difficulty level
28
+ const args = process.argv.slice(2);
29
+
30
+ const difficulty = args[0]; // Get the difficulty level from command line arguments
31
+
32
+ // Generate a Sudoku puzzle
33
+ const sudoku = generateSudoku(difficulty);
34
+
35
+ // Print the puzzle
36
+ printSudoku(sudoku);
37
+
38
+ // Solve the puzzle
39
+ solveSudoku(sudoku);
40
+
41
+ // Print the solved puzzle
42
+ printSudoku(sudoku);
43
+
44
+ process.exit();
45
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sudoku-pro",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "sudoku-pro humbly presents itself as your go-to Node.js toolkit for generating, solving, and printing Sudoku puzzles spanning different difficulty levels. Powered by the reliable backtracking algorithm, it aspires to offer enthusiasts and learners alike a simple yet effective platform to engage with Sudoku puzzles. With Sudoku-Pro, embark on a journey of brain-teasing challenges or delve into educational endeavors with ease. Our humble interface aims to make Sudoku puzzle creation and enjoyment accessible to all, ensuring a delightful experience for users of varying skill levels. Join us in exploring the possibilities of Sudoku puzzles while we humbly accompany you on your puzzle-solving adventures.",
5
5
  "main": "sudoku-pro.js",
6
6
  "repository": {
@@ -17,22 +17,24 @@
17
17
  ],
18
18
  "keywords": [
19
19
  "Sudoku",
20
+ "Sudoku Teaser",
20
21
  "Puzzle",
21
22
  "Game",
22
- "Logic",
23
- "Numbers",
23
+ "Numbers Game",
24
24
  "Board",
25
- "Generator",
26
- "Solver",
27
- "Difficulty",
28
- "Easy",
29
- "Medium",
30
- "Hard",
25
+ "Sudoku Engine",
26
+ "Sudoku Generator",
27
+ "Sudoku Solver",
28
+ "Sudoku Difficulty",
29
+ "Easy Sudoku",
30
+ "Medium Sudoku",
31
+ "Hard Sudoku",
31
32
  "Logic Game",
32
33
  "Recreational Mathematics",
33
34
  "Brain Teaser",
34
35
  "Puzzle Game",
35
- "Numbers Game"
36
+ "Numbers Game",
37
+ "Backtracking"
36
38
  ],
37
39
  "author": "Ashish Vashisht",
38
40
  "license": "MIT",