Closed Lemkinator closed 1 year ago
More Background information: I'm using this Lib in my Android App and the App sometimes crashes because of that AssertionError. When i catch the AssertionError and just retry creating the sudoku everything works fine, except in some rare cases where an invalid sudoku is created (and no AssertionError is thrown)...
Creating 9x9 or larger Sudokus seems to be fine...
Thank you very much for the helpful bug report! I could reproduce and solve the problem with that. Solution validated with unit test inspired by your reproduce instructions.
Background: In case of a dead-end sudoku, the do-loop in Creator.createFull() did not clear riddle again. Because of that the new initialization failed.
Fix is in release 5.0.1.
Expected Behavior
should return a valid 4x4 Sudoku.
Actual Behavior
(1) returns an invalid Sudoku: Example in Kotlin:
(2) throws an AssertionError: Example in Java: Arguments: -t -e Both -s S4x4 JVM-Options: -ea
Steps to Reproduce the Problem