DEV Community

loading...

Discussion on: Building a React app to solve every Sudoku puzzle.

Collapse
andxre profile image
Andre

Really well done! A suggestion would be to make inputting a new board easier. I feel like the current process is quite tedious. Maybe randomized boards too! Other than that, this is really great

Collapse
jsolano profile image
J.P. Solano Author

That's correct Andre, thank you for the feedback, I'll add the randomized option soon..

Collapse
jsolano profile image
J.P. Solano Author

Hi Andre, I just updated the repo and the online demo with your suggestion, I hope you will enjoy it. /JP

Collapse
andxre profile image
Andre

I just tried it out and it's really cool! One more bug I found was when inputting a sudoku string (ex. ..6.....2.81.4293.25...34..4.8.1..76..2...8..17..6.3.9..35...94.9732.51.5.....7..) it solves it in the first column instantly rather than the second.

Thread Thread
jsolano profile image
J.P. Solano Author

Great! Thank you for take a look. I tested your sudoku string and it's not a bug, what's happening is when you load a new puzzle, the parseGrid method apply strategy 1 and to 2 (assign(values, square, digit) Solver.js, line 148) to generate the possible values for the cell. In this case, resolve the complete puzzle. May be need a message explaining what happens.

Thread Thread
jsolano profile image
J.P. Solano Author

Hi Andre, I updated (repo and live) with a message when the board is solved in the load state. Thank you for sharing your feedback.