Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class DiceTester{
  4.  
  5. public static Dice createDice(){
  6. return new Dice();
  7. }
  8.  
  9. public static int[] makeThrows(int n){
  10. int[] throwsList = {0,0,0,0,0,0,0};
  11. Dice d = createDice();
  12.  
  13. for(int i = 1; i<=n; i++){
  14. d.throwDice();
  15. throwsList[d.getCurrentFace()] += 1;
  16. }
  17.  
  18. return throwsList;
  19. }
  20.  
  21. public static void main(String[] args){
  22. System.out.println(makeThrows(5));
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement