Thread: Sudoku again
View Single Post
Old 03-12-2009, 04:10 PM   #1
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Sudoku again

There are not a lot of 'positive threads' lately, so let me post yet another version of Sudoku. Again I hope that the supplied source code inspires others to also write some programs for the DR.

It reuses the sudoku generator and solver from gtk-sudoku, but the complete 'look-and-feel' is new.

Copy the content mxSudoku.zip in the root of your SD-card. After inserting the card in the DR you will have a 'Programs' folder with the mxSudoku short-cut to start the program.

It shows two grids, one empty and one with the number 1-9, ?, C and V

First select 'new' or 'open' from the menu, this will fill the upper 'board' grid with some values. Search for a number to add, select it first in the lower 'keypad' and then the cell in the 'board'-grid into which it should go.

The number that is selected (grey) will be copied into every cell you select in the board grid. Use 'C' to clear a cell. Use 'V' to verify your current solution.

The '?' selects the 'cheat'-mode and fills in the correct value in every cell you touch on the board.

Note that my main goal was to practice some programming on the DR, so the game will not be perfect. (E.g. the random games generated are far to difficult for begining sudoku players and a lot of more comments can be made.)

If you want to play with the source code, it is easiest to use the VMWare image from Adam on a windows machine (see the sticky thread).
Once the source is unpacked:
- run the Ajunta plugin by clicking mxSudoku.anjuta
- enable the poky plug-in (Edit->Preferences)
- Do an auto generate (Build-menu)
- and a configure with --prefix=/usr
- Then build the project

See the iRex documentation for more information on developing and development environment.

(Use the 1.03 poky images since the 1.5 do not allow you to use the mouse as a 'stylus')

I tried to put a lot of comments in the code, so I hope it is self explaining, but please let me know if something is not clear to you.

pfff thats posted ...
Attached Files
File Type: zip mxSudoku.zip (110.2 KB, 496 views)
File Type: gz mxSudoku_v1.tar.gz (55.7 KB, 406 views)
Mackx is offline   Reply With Quote