Thread: Game of Craps Source Code

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    1

    Unhappy Game of Craps Source Code

    Anyone have C source code for the game of Craps ?

  2. #2
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    no.

  3. #3
    Unregistered
    Guest
    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!

  4. #4
    GoofProgram
    Guest
    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.

  5. #5
    Unregistered
    Guest
    or as a matter of fact http://c-for-dummies.com its the unofficial site to supplement the book.

  6. #6
    Registered User
    Join Date
    Feb 2002
    Posts
    14
    I dont have it on disk, but if you buy the book C for Dummies it's in there.

    James

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C Programming 2d Array Question
    By jeev2005 in forum C Programming
    Replies: 3
    Last Post: 04-26-2006, 03:18 PM
  2. Problem with game code.
    By ajdspud in forum C++ Programming
    Replies: 5
    Last Post: 02-14-2006, 06:39 PM
  3. Source code....
    By Darkcoder in forum Game Programming
    Replies: 8
    Last Post: 03-07-2005, 08:58 PM
  4. Obfuscated Code Contest
    By Stack Overflow in forum Contests Board
    Replies: 51
    Last Post: 01-21-2005, 04:17 PM
  5. Open Source Game Dev
    By RussMan in forum Game Programming
    Replies: 1
    Last Post: 09-23-2003, 02:19 PM