i am trying to make a penny pitch game. the sum is returned at the end of the game and the player has 2 options: toss and quit. the program does this when the toss option is clicked: generates two random numbers from teh row n column toss, add number at this position to the running total, and displays the board replacing the numbers with P's where pennies land.
here is what the board looks like
1 1 1 1 1 1 1
1 2 2 2 2 2 1
1 2 3 3 3 2 1
1 2 3 5 3 2 1
1 2 3 3 3 2 1
1 2 2 2 2 2 1
1 1 1 1 1 1 1
the boards position are indexed starting at [1,1] in the top left, not [0,0], thus the rows n columns go from 1 to 7.
i have succcessfully programed this in c++, but am unable to do so in java...arrays are just not my thing
if anyone can assist, that would be great, thanks.
here is what the board looks like
1 1 1 1 1 1 1
1 2 2 2 2 2 1
1 2 3 3 3 2 1
1 2 3 5 3 2 1
1 2 3 3 3 2 1
1 2 2 2 2 2 1
1 1 1 1 1 1 1
the boards position are indexed starting at [1,1] in the top left, not [0,0], thus the rows n columns go from 1 to 7.
i have succcessfully programed this in c++, but am unable to do so in java...arrays are just not my thing
if anyone can assist, that would be great, thanks.
Comment