// Michael Tartaglia
// Dice: Tossing Dice


import java.util.Random;

public class Dice
{
   private Random diceValues;
   private int face;

   public Dice() {
      diceValues = new Random();
      this.pause();
   }

   public int getValue() {
      return face;
   }

   public void toss() {
      face = diceValues.nextInt(6)+1;
   }

   private void pause() {
      // Assures that multiple dice instances are not created
      //    in the same millisecond timeframe

      try {Thread.sleep(5);}
      catch (InterruptedException ie)
      { // Do nothing
      };
   }


}
