The attached project will generate and solve Sudoku puzzles (9x9). The code to solve the puzzles with was adapted from here (converted to B4A). The code to generate Sudoku puzzles with comes from here. It was adapted and then compiled to a B4A library. The library files (jar and xml) are in the /files folder of the attached project.
When it starts up it will randomly select one of the Sudoku puzzles that @Erel has posted in the project that you can find here. Just click/press on "Solve" and the puzzle will be solved (it also reports the time taken in milliseconds to solve the puzzle).
Click/press on button "Create" to randomly create a new Sudoku Puzzle. It will report the number of non-zero cells in the newly created puzzle. Then click/press "Solve" to solve the puzzle. Take note that generating new Sudoku puzzles can take a while...
Posting the following:
1. The B4A project (with library files in the /files folder - copy it to your additional library folder)
2. The zipped java source code that the library files (jar and xml) were generated from
This was done.....just for fun....
When it starts up it will randomly select one of the Sudoku puzzles that @Erel has posted in the project that you can find here. Just click/press on "Solve" and the puzzle will be solved (it also reports the time taken in milliseconds to solve the puzzle).
Click/press on button "Create" to randomly create a new Sudoku Puzzle. It will report the number of non-zero cells in the newly created puzzle. Then click/press "Solve" to solve the puzzle. Take note that generating new Sudoku puzzles can take a while...
Posting the following:
1. The B4A project (with library files in the /files folder - copy it to your additional library folder)
2. The zipped java source code that the library files (jar and xml) were generated from
This was done.....just for fun....