Anyone have C source code for the game of Craps ?
Anyone have C source code for the game of Craps ?
Use rand function for each die, and add together. A total of 7 or 11 wins, and 3 or 12 loses. Anything else becomes the players point. You then go into a loop until player rolls hid point again and wins, or rolls a 7 again and loses. A great programmer did it in 57 lines. Hope that helps!
The post right befor this one is right or you could get the code from some place. I got the code out of the "C4Dummies vol.1" book. I can't post the code because it might be Copyrighted, if you want to see it go to the book store and look at it (or buy it). It's in the back of the book.
or as a matter of fact http://c-for-dummies.com its the unofficial site to supplement the book.
I dont have it on disk, but if you buy the book C for Dummies it's in there.
James