# Lucas Martin

Greenhorn
since Mar 09, 2011
Cows and Likes
Cows
0
In last 30 days
0
Total given
0
Likes
0
0
Total given
1
Given in last 30 days
0
Scavenger Hunt
Ranch Hand Scavenger Hunt
Greenhorn Scavenger Hunt

## Recent posts by Lucas Martin

Exactly, the 7's are much more likely to add up from the 2 die sums and it shows this.
Well at least now it's here for people to learn from.
11 years ago
I got it: I was initializing them correctly, but to my surprise I added the braces and works like a charm *forehead denter*

11 years ago
Well I thought I knew what I was doing and have spent some timeon this but apparently not. So now I am getting dice1 has not been initialized and I do not think I am summing up the two random 1,6 numbers into the total and adding them to the array correctly, any final touch ups are appreciated, thanks.

11 years ago
That answers it for me, thanks.
11 years ago

Greg Brannon wrote:So you have an array that can hold 6 values, 1 - 6, and a random number generator that generates random values 1 - 6. With two dice, the array will have to be scaled to hold the values 2 - 12 (11 total), and your random number generator will have to be modified to generate values from 2 - 12. Modifying the code you've already written should be relatively easy.

I thought about that, wouldn't that throw off the results of rolling 2 die with a 1-6 outcome and adding the values? I guess I am failing at the logic here.
11 years ago
I have coded a dice rolling simulation to roll a single die 36,000 times, store the data in the array and display how many times the face value landed. My question is what do I need to do to change this to simulate rolling 2 die to display the output of 2-12 face value, so adding the face value of the 2 randomly rolled die and incrementing face value. Here is the code I have for the single die:
11 years ago
Thank you, that corrected quite a few problems right there just by some typing errors. Now to just figure out why it's not populating the right text field and keeping score :/
11 years ago
I'm unsure about what to do with this section of code, errors are on lines 368 - 388, it's underlined in red using Eclipse and says, pointDie*JLabel1 (* is 1-5) as it does this on all lines through this section, cannot be resolved. I have a feeling it has something to do with the arrays and variables above, I need some help and any other issues you may come across. I know rollFives and moveDice is undefined at this time, and change player as this was going to be assigned for two players only but thought I'd try to let it decide 1-5 players. The scores are also suppose to populate in the JTextField on the right depending on how many players were selected....so lost. Any help will be appreciated.

BTW the other errors are at 463 in the else if , 479 with the turnpoints undefined

11 years ago