I didn't really read your code, and I am a beginner with Java as well, but have done similar things in VB and in flash, as well as used similar concepts in javascript.
So, I can give you the theory here but can not give you exact java code.
Step one;
when the game loads you need to set a variable "myRolls" (give it your own name if you want) equal to 1 (or zero if you wish).
After each roll, give it a new number of
myRolls + 1 (or myRolls ++ as would work in most languages).
At each interval, you need to do the following.
Check if player's guess matched, if not then check the value of myRolls. If myRolls == 3... If so, game over, if not, roll again.
If the player has guessed, no need to do anything else except "you win, wanna play again"...
Make sure that if they choose to play again, you set myRolls back to the default number again.
Hope this helps.
Sage
Reputation Points: 10
Solved Threads: 6
Junior Poster in Training
Offline 86 posts
since Nov 2007