Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.*;
- public class TestDice2 {
- public static int[] roll(SpecialDice theDice, int nrRoll) {
- int[] data = new int[theDice.getSides()];
- for (int i = 1; i <= nrRoll; i++) {
- theDice.roll();
- int value = theDice.getDots();
- data[value - 1] = data[value - 1] + 1;
- }
- return data;
- public static int[] valueOf(int[] number) {
- for (int j = 0; j < nrRoll; j++) {
- valueOf[j] * (j+1);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement