This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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
Using Methods in methods
So far...
catch statements
Help.
DiceGame Code - which is better?