mattflow / sudoku-solver

Simple, lightweight sudoku solver.
https://mattflow.github.io/sudoku-solver
MIT License
3 stars 0 forks source link

Logic for Randomly generated numbers #6

Closed SirPhemmiey closed 2 years ago

SirPhemmiey commented 2 years ago

Hi, great work on providing this solver library.

Just one question/request - how can i get the code used for generating the random numbers on the puzzle board? Would appreciate if you can poiint me to the right location or snippet.

Looking forward to it.

Thanks.

mattflow commented 2 years ago

Hey @SirPhemmiey,

Thanks for the kind words. I am assuming you are talking about the sudoku puzzles on the webpage. I do not have code to generate those. I use a JSON file which holds a large number of puzzles. That file is https://github.com/mattflow/sudoku-solver/blob/gh-pages/src/components/sudokus.json and you can feel free to use it if you like.

There seem to be some good generator libraries out there. A popular one looks to be https://github.com/robatron/sudoku.js (I haven't used it, I just found it through searches).

Hope this helps!

SirPhemmiey commented 2 years ago

Hey @mattflow , that helps, thanks so much.