# Need Help With Java Game



## QWERTY1 (Nov 6, 2010)

Hi,
I was wondering if someone could help me! I've new to java! I'm using the IDE Netbeans. I have to create a dice game which will do the following:

On pressing the new game button, both dice are removed from view, any message is removed from view and the roll the dice button is enabled
On pressing the roll the dice button once after the new game started the computer’s dice will be rolled and the result displayed
On pressing the roll the dice button a second time, the player’s dice will be rolled and the result will be displayed; the roll the dice button will then be disabled. If the player’s dice is higher than the computer’s dice, the window will display “Winner!” to the user and the score will increase by 2 points. If the player loses, the window will display “You lose” and the score will decrease by 1 point.

I would really appreciate any help and how to do this. I am particulary confused on how to get the dices to work! Thanks in advance!


----------



## digibucc (Nov 6, 2010)

class work?


----------



## QWERTY1 (Nov 6, 2010)

Tutorial work yes. Stuck on how to create two dice and how to switch between them one for the computer and one for the player.


----------



## digibucc (Nov 6, 2010)

QWERTY1 said:


> Tutorial work yes. Stuck on how to create two dice and how to switch between them one for the computer and one for the player.



yeah i don't know anything about netbeans or even Java... it just sounded exactly like that type of project... good luck!


----------



## Kreij (Nov 7, 2010)

Just create two integer variables, one called PlayerDice and one called ComputerDice, which will hold the current value of the rolls.


----------

