Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. import javax.swing.*;
  2. public class TestDice2 {
  3.  
  4. public static int[] roll(SpecialDice theDice, int nrRoll) {
  5.  
  6. int[] data = new int[theDice.getSides()];
  7.  
  8. for (int i = 1; i <= nrRoll; i++) {
  9. theDice.roll();
  10. int value = theDice.getDots();
  11. data[value - 1] = data[value - 1] + 1;
  12. }
  13. return data;
  14.  
  15. public static int[] valueOf(int[] number) {
  16.  
  17. for (int j = 0; j < nrRoll; j++) {
  18. valueOf[j] * (j+1);
  19. }
  20.  
  21. }
  22.  
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement