Once a night, there was no soft girlfriend at the side and I decided to play in some game. Tetris is to fast and active, sokoban is completed long ago and World of Goo heats CPU too much — so I choose sudoku. Opened websudoku.com and started playing. Everything is ok, but that is not under SXEmacs and not available offline. Decided to write sudoku.el to play sudoku under SXEmacs. Skim over the internet and found sudoku.el for (X)Emacs. Downloaded, started and disappointed, looked to the code and got depression. So night was spent rewriting sudoku.el to satisfy my needs, namely:
- Handy, eye-candy and informative interface
- Possibility to download sudokus from websudoku.com and menneske.no
- Possibility to print sudokus
- Possibility to edit sudokus
- Possibility to save/load sudokus
- Pencils for master techniques
- Easy cells autocompletion, so you solve only hard part of the puzzle
Example
Let's run M-x sudoku RET:
Here is a bunch of easy cells, for example R5C5 (where cursor is) and of course we are to lazy to fill them, so let's press a, we will get:
Now is really hard part of the puzzle, but peculiarity for the value 4 is seen, so we get the pencil — p and use Nishio technique, starting from R8C9 cell:
- R8C9 -> 4 (Nishio start)
- R2C3 -> 4 (only cell in C3 where 4 can be)
- R3C7 -> 4 (only cell in R1 where 4 can be)
- No place for 4 in 8th square
So 4 can't be in R8C9. C-u p to cancel the pencil. Now we know that 4 is in R2C9:
Nice sudoku. I like it, my son will like it too, so let's print it with P. On the paper it will look like this:
Download
Download from http://lgarc.narod.ru/xemacs/sudoku.el
Send notices, bugreports, fixes to lg AT sxemacs.org
No comments:
Post a Comment