Sudoku, version 1/2
Author |
Message |
Martin
![](http://www.compsci.ca/wiki/images/4/46/CanadianStickUp.jpg)
|
Posted: Wed Aug 09, 2006 9:40 pm Post subject: Sudoku, version 1/2 |
|
|
I wrote this this morning while playing with ncurses. Doesn't check for victory or load/save games yet, but checks errors as you go. Arrow keys to move around, 1 - 9 to add a number, 0 to erase a number, q to quit.
Enjoy! Tell me if you find bugs. Compile with code: | g++ sudoku.cpp -o sudoku -lncurses | . You need to have ncurses installed for it to work.
EDIT: Now it can load maps. Still no saving or victory checking yet.
Description: |
|
![](http://compsci.ca/v3/pafiledb/images/icons/clip.gif) Download |
Filename: |
level1.txt |
Filesize: |
162 Bytes |
Downloaded: |
424 Time(s) |
Description: |
|
![](http://compsci.ca/v3/pafiledb/images/icons/clip.gif) Download |
Filename: |
sudoku.cpp |
Filesize: |
8.93 KB |
Downloaded: |
567 Time(s) |
|
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
wtd
|
Posted: Wed Aug 09, 2006 11:57 pm Post subject: (No subject) |
|
|
Without extensively analyzing the code, any time I see "error checking" I immediately think "exceptions."
Yes, C++ has exceptions.
|
|
|
|
|
![](images/spacer.gif) |
Martin
![](http://www.compsci.ca/wiki/images/4/46/CanadianStickUp.jpg)
|
Posted: Thu Aug 10, 2006 3:04 am Post subject: (No subject) |
|
|
Oh I know about C++ exceptions.
But what I meant by error checking was checking when the user made a mistake with the game rules, such as putting two of the same number in the same row/column/3x3 box.
|
|
|
|
|
![](images/spacer.gif) |
wtd
|
Posted: Thu Aug 10, 2006 12:51 pm Post subject: (No subject) |
|
|
Ah.
|
|
|
|
|
![](images/spacer.gif) |
|
|