Recently I’ve had somewhat of a sudoku addiction and decided to make a puzzle generator and solver for my phone using J2ME. The game can generate puzzles with a variety of difficulties from Novice to Master. The game’s solver can even be used to key in and play sudoku puzzles that you find in books, etc.
Mobile phones are surprising powerful considering how basic their hardware specs are when compared with a desktop. I designed the UI of this game to adapt to the size of the phone display size since they vary drastically. I even added scrolling for older phones that have really tiny display resolutions.
Since puzzles are generated randomly I thought it would be fun to provide a way for the player to see the random seed for their puzzle so that they can share it with a friend and compete to see who can solve the puzzle first. The seed is shown on the paused screen and can then be input by selecting “Custom” game from the main menu:
Some people (like my friend) like to highlight cells whilst following their train of thought. I added a utility that allows the player to color cells in:
When solving sudoku puzzles on paper people tend to mark candidate values using pencil whilst following logic through a puzzle. Pressing a number twice will turn it into a smaller “pencil mark” inside the cell.
There is a “Hint” sub-menu on the options menu that can be used if you get stuck on a puzzle. You can get a simple validation to tell you if there are mistakes on the puzzle; have it automatically fill in all of candidate value markings or straight out peak at a random cell:
One of my favorite games “Ratchet and Clank” has various skill points which is basically a checklist of extra challenges that you can complete. I came up with a series of these challenges which the player can complete over time. There are even a few particularly challenging puzzles which are hard-coded in and shown in the skill points list.
The game also keeps track of various statistics which help you to track your progress in becoming a sudoku master. Puzzle seeds are shown for each notable game so that you can challenge a friend to the same puzzle.
Finally there is the solver screen which allows you to input a puzzle which can then be played using the phone. There is an option to turn all inputted values into hints so that they cannot be accidentally erased.
Of course the solver can be used to solve puzzles and will give an indication of the difficulty and estimated completion time. The estimated completion times are surprisingly accurate.
BONUS! - Extra Large Puzzles
For fun I also generated a couple of giant sudoku puzzles by generating a series of regular size puzzles and then stitching them together. I made an easy one and a hard one which can be downloaded here (caution the answers are on the last page):