Quote:
Originally Posted by Skeeve
Hi Steffen.
I think I read somewere that the Solo puzzles were too hard for some. For me the hardest 9×9 are too easy
I think it'll break the API but I would be glad would there be a way to load my "own" sudokus. I once created a wrapper for PocketBook's Sudoku which allowed me to do that. The downside is: Every Sudoku counts as a "book" and thus floods the books database.
I'm thinking about writing a wrapper for SGTPuzzles which would pre-fill the state-file with a Sudoku and then start SGTPuzzles.
|
There is already something in the app that might be helpful. In the current nightly release, I have integrated a 'manual' entry mode. It starts with an empty sudoku grid, where one can enter numbers as usual. Tapping outside the grid then will fix these numbers, then normal gameplay starts.
Of course, this does not allow to save certain games into game files or build a library of individual sudoku games. But it should be sufficient to transcribe a challenging sudoku from an external source for playing on the eReader.
There are interfaces in the original code to serialize / deserialize games, and this is used to save the current game state into system/state/sgtpuzzles.cfg. Unfortunately, the puzzle collection uses a very compact format to encode games, which need a little bit of effort to understand. An example of a solo game description would be this:
"3x3:7a6c5a4_5_9_1_7a3h2c4_5b3b1d4a7d3b1b5_8c1h9a4 _1_8_3_1a4c9a5"
This format is necessary, as not only regular sudokus need to be encoded, but also 'jigsaw' or 'killer' mode sudokus.
Furthermore, the configuration file sgtpuzzles.cfg not only saves the game description, but the whole game state as a hex-encoded binary, which is then even more complicated to generate.
So writing a wrapper would be theoretically possible, but I would not recommend it, as it might get quite complicated.