Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Sudoku, version 1/2
Index -> Programming, C++ -> C++ Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Martin




PostPosted: 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.



level1.txt
 Description:
sample level

Download
 Filename:  level1.txt
 Filesize:  162 Bytes
 Downloaded:  415 Time(s)


sudoku.cpp
 Description:
With error checking :)

Download
 Filename:  sudoku.cpp
 Filesize:  8.93 KB
 Downloaded:  552 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: 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. Smile
Martin




PostPosted: 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.
wtd




PostPosted: Thu Aug 10, 2006 12:51 pm   Post subject: (No subject)

Ah.
Display posts from previous:   
   Index -> Programming, C++ -> C++ Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: