aspose file tools*
The moose likes Beginning Java and the fly likes dice game Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "dice game" Watch "dice game" New topic
Author

dice game

Stephen Foy
Ranch Hand

Joined: Oct 17, 2005
Posts: 143
Hi,

Could someone give me some feedback on how to improve this, and of silly things ive done?



Stephen Foy - Microsoft Application Development Consultant
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
A neat exercise is to write out the simplest description of the game you can think of, then try to make the code look like that. I don't know if I have the rules quite right but it might look something like:

If the rules look right, see if you can make the core of your program have almost exactly that many lines and say almost exactly those rules to the reader. The other methods like getBestOfThreeThrows() should be easy to build out of the code you already have.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
Don't get me started about those stupid light bulbs.
 
subject: dice game