Read more about my Sudoku game here: part 1, part 2, part 3, part 4
Although I spent most of today packing for vacation (you probably won’t see too many updates on this site the coming three weeks), I managed to squeeze in a couple of hardcore programming hours, which allowed me to finish a first working version of my sudoku game. Some screen shots:
So here’s how it works:
- The user selects a difficulty (the higher the difficulty, the less visible clues) using the left and right arrow keys and then clicks the orange button
- A completely random Sudoku is generated and displayed on the screen
- The arrow keys are used for navigating the grid: the left key moves the cursor over one spot to the left, and the right arrow key moves the cursor down one spot. If the user reaches a side/ corner, the next arrow click will bring the cursor to the other side of the playing field, as illustrated below:
- Clicking the square orange key when an editable cell is selected (“clue” cells aren’t editable) will increment the cell’s value by 1, unless its value is 9, in which case the cell will be reset to 0
- Clicking the rectangular gray key will check the user’s version of the sudoku against the answer key (a copy of the generated sudoku without the non-clue cells removed), and tell the user how many errors there are. If there aren’t any, a “You win!” message will appear and the program will be aborted; if there are errors (including un-solved cells), the user will be asked if he/ she wants the wrong cells reset — if yes, the program will clear these cells, if no, they’ll remain wrong and the user will return to the game
So overall I’m very pleased with the game, because it was quite challenging to make it work doing some pretty difficult things, such as:
- Generating a completely random Sudoku from scratch every time the program runs
- Deciding which cells could safely be hidden from the user while still keeping the Sudoku solvable
- Making a custom, smaller, font for the NXT to be able to show a grid around the numbers.
Anyways, if you’d like to download the most current code for this project, see this page here:
https://sourceforge.net/projects/dimastero/files/Sudoku/?
Changelog:
- v1.0.0 (7/27/2012) Initial release
- v1.0.1 (7/27/2012) Added documentation
Read more about my Sudoku game here: part 1, part 2, part 3, part 4


[...] Read more about my Sudoku game here: part 1, part 2, part 3, part 4 Although I spent most of today p… Shea Bunge [...]
[...] Read more about my Sudoku game: part 1, part 2, part 3, part 4 [...]
[...] Read more about my Sudoku game: part 1, part 2, part 3, part 4 [...]