import java.util.ArrayList;
import java.util.Collections;

public class RollGame1 {
  private static final int NUM_DICE = 5;
 
  private ArrayList<ColoredDie> dice;

  public RollGame1() {
    this.dice = new ArrayList<ColoredDie>();
	    
    this.dice.add(new ColoredDie(6, DieColor.RED));
    for (int i = 1; i < RollGame1.NUM_DICE; i++) {
      this.dice.add(new ColoredDie(6, DieColor.WHITE));
    }
    Collections.shuffle(dice);
  }

  public int rollPoints() {
    int total = 0;
    for (ColoredDie d : this.dice) {
      int roll = d.roll();
      if (d.getColor() == DieColor.RED) {
        total += 2*roll;
      }
      else {
        total += roll;
      }
    }
    return total;
  }
}
