Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class DiceTester{
- public static Dice createDice(){
- return new Dice();
- }
- public static int[] makeThrows(int n){
- int[] throwsList = {0,0,0,0,0,0,0};
- Dice d = createDice();
- for(int i = 1; i<=n; i++){
- d.throwDice();
- throwsList[d.getCurrentFace()] += 1;
- }
- return throwsList;
- }
- public static void main(String[] args){
- System.out.println(makeThrows(5));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement