betofigueiredo / sudoku

Sudoku board created with SvelteKit, Typescript and Tailwind.
https://betofigueiredo.github.io/sudoku/
18 stars 1 forks source link

Produces puzzles with two possible solutions #1

Open avarun42 opened 12 months ago

avarun42 commented 12 months ago

I have "highlight errors" on here, so I know none of my entered squares so far are incorrect. image

Entering this puzzle into a sudoku solver outputs that there are two possible solutions to this puzzle. That is not allowed in a proper sudoku puzzle (see here).

betofigueiredo commented 11 months ago

Hi @avarun42. Yes, the code that generates boards is not perfect, but this was just a small project to study Svelte. In a real product maybe it would be best to use an API to get new boards. Another way is to validate the board as the user fills the numbers, today I just compare it to the generated solution board. I want to try Svelte Runes, so maybe I will fix this soon.

Thanks for the feedback.