|
-
September 27th, 2012, 03:46 AM
#6
Re: Need help designing my craps program.
 Originally Posted by raptor88
Very good points and thanks for pointing them out. I'll use your suggestions in future projects.
But since this will be my first C++ project, I want to keep the code as simple as possible.
What is to say that using MVC is not simpler? Do you have the rules of the game coded? What good is the UI if the game doesn't properly implement the rules? It seems you're making the mistake that many beginner coders make, and that is concentrating and coding nice or "cool" looking output, and neglecting the most important parts of the program (the calculations required, in your case the rules of the game, etc.).
Assume there is no UI. Do you have the individual functions coded to handle bets, randomly "throw dice", react to the number thrown, handle multiple persons playing the game? None of these require a user interface. At most, you would have a console main() app that randomly places bets, rolls dice, etc. thereby exercising the rules of the game to see if the rules are implemented correctly. Once that is done, then you go from there. Or maybe there is an input file that has a simulated game -- you read the file and see if the rules are implemented correctly. Again, no UI is required.
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|