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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dice game
 
Similar Threads
DiceGame Code - which is better?
catch statements
Using Methods in methods
Help.
So far...