Skip to content

Warn when the solution, if any, is violated

My motivation for this change has to do with making mistakes and only realizing it later, but not knowing when it happened or how to fix it. Being warned at the time is helpful. It also makes it easier to learn the logic error being made, and not make it again.

This will probably require some discussion before merging. For example should the existing "Warnings" checkbox be split into the existing functionality vs. this change?:

Warnings
  Number   conflicts ✅
  Solution conflicts ✅

This functionality will only play a role if there is a single unique solution.

It may be helpful in the future to have the solution available for other reasons. For example, it will make it easier to have some sort of hint feature.

I'm not sure how handle guesses. That is, while solving a hard Sudoku if the user wants to guess the value for a cell this would immediately reveal incorrect guesses. Although probably outside the scope of this change it might be nice if there was some sort of guess functionality where the user indicates that the value being placed is a guess. Solution conflicts would then be turned off for that cell. When the user realizes the chosen branch is incorrect there would be a feature that would revert to when the guess was made. The incorrect guesses for the cell would be tracked. As a workaround warnings could be turned off prior to guessing.

Merge request reports