Computer Science Canada

Sudoku, version 1/2

Author:  Martin [ 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.

Author:  wtd [ Wed Aug 09, 2006 11:57 pm ]
Post subject: 

Without extensively analyzing the code, any time I see "error checking" I immediately think "exceptions."

Yes, C++ has exceptions. Smile

Author:  Martin [ Thu Aug 10, 2006 3:04 am ]
Post 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.

Author:  wtd [ Thu Aug 10, 2006 12:51 pm ]
Post subject: 

Ah.


: