I am working on an assignment where you essentially create a Java application where the user plays against the computer, in a 10 round game of throwing dice. You are to roll 5 dice, then the computer does the same, and whoever has more of a kind (2 threes, 3 fours, etc) wins the round. I am having issues with setting up the actual application. I was initially creating 5 individual die per person, but decided to go with a die array, that holds 5 dice to be thrown, with 6 sides each. I am now having trouble with getting the program to properly give values for each die, using a math.Random function. I also am unaware of a way to get the computer to understand the values on each die, and count how many of a kind you have. I will post the code later on tonight, but figured I could maybe get some initial help/ guidance before doing so. Thanks for any help!
Aucun commentaire:
Enregistrer un commentaire