/*************************************************
 * YUtil provides utility values and methods 
 * for the Yahtzee game
 *
 * @author Nancy Harris AND <<<  your name here >>>
 * @version V1
 ************************************************/
public class YUtil
{
   // Values used in other classes
   public static final int ACE = 0;
	public static final int TWO = 1;
	public static final int THREE = 2;
	public static final int FOUR = 3;
	public static final int FIVE = 4;
	public static final int SIX = 5;
	public static final int KIND3 = 6;
	public static final int KIND4 = 7;
	public static final int FULL = 8;
	public static final int SMALL = 9;
	public static final int LARGE = 10;
	public static final int YAHTZEE = 11;
	public static final int CHANCE = 12;
	public static final int SCORES = 13;
	public static final int BONUS_LIM = 63;
	public static final int BONUS_NUM = YUtil.SIX;
	public static final String[] HAND_DESC = {"Aces", "Twos", "Threes",
    "Fours", "Fives", "Sixes", "3 of a kind", "4 of a kind", "Full House",
    "Small Straight(4)", "Large Straight(5)", "Yahtzee", "Chance"};

 /*************************************************
 * getDescription provides the description of the 
 * hand
 *
 * @param which - The zero based description we want
 * @return The description associated with that position
 *         or "Bad index" if the index is out of bounds.
 ************************************************/
   public static String getDescription(int which)
   {
      String result;
      result = "Bad index";
      if (which > 0 && which < HAND_DESC.length)
         result = HAND_DESC[which];
      return result;
   }
    /*************************************************
    * getLocation provides the location of the 
    * hand
    *
    * @param hand - the description of the hand
    * @return The index of the hand or -1 if not found
   ************************************************/
   public static int getLocation(String hand)
   {
      int result;
      result = -1;
      for(int ii = 0; ii < HAND_DESC.length && result == -1; ii++)
      {  
         if (HAND_DESC[ii].equalsIgnoreCase(hand))
            result = ii;
      }
      return result;
   }

    /********************************************************
    * this method checks the dice for aces and returns the 
    * score, 1 point for each ace (or one).
    * NOTE: this method may not change the original order of 
    * the Dice.
    *
    * @param a set of 5 dice
    * @return the score
    ***********************************************************/
	public static int acesScore(Dice aDice) 
   {
	   return -1;	
	}
    /********************************************************
    * this method checks the dice for aces and returns the 
    * score, 5 points for each five.
    * NOTE: this method may not change the original order of 
    * the Dice.
    *
    * @param a set of 5 dice
    * @return return the score
    ***********************************************************/
	public static int fiveScore(Dice aDice) 
   {
	   return -1;	
	}
    /********************************************************
    * this method checks the dice for a full house. A full 
    * house is 2 of one value and 3 of another. A Yahtzee
    * is considered a full house.
    * If a full house is found, return 25. If not, return 0
    * NOTE: this method may not change the original order of 
    * the Dice.
    *
    * @param a set of 5 dice
    * @return the score
    ***********************************************************/
	public static int fullScore(Dice aDice) 
   {
      return -1;	
   }
    /********************************************************
    * this method returns the score of the number of threes
    * found. The score is 3 points for each three.
    *
    * NOTE: this method may not change the original order of 
    * the Dice.
    * @param a set of 5 dice
    * @return the score
    ***********************************************************/
	public static int threeScore(Dice aDice)
   {
	   return -1;	
	
	}
    /********************************************************
    * this method checks the dice for sixes and returns the 
    * score, 6 points for each six.
    * NOTE: this method may not change the original order of 
    * the Dice.
    *
    * @param a set of 5 dice
    * @return the score
    ***********************************************************/
	public static int sixScore(Dice aDice) 
   {
      return -1;	

	}
    /********************************************************
    * this method checks the dice for a small straight. A
    * straight is 4 numbers in contiguous order. 2,3,4,5 or 
    * 1,2,3,4 or 3,4,5,6 are considered a small straight.
    * Return 35 if there is a small straight and 0 otherwise
    * A Yahtzee automatically counts as a small straight.
    *
    * NOTE: this method may not change the original order of 
    * the Dice.
    *
    * @param a set of 5 dice
    * @return the score
    ***********************************************************/
	public static int smallScore(Dice aDice) 
   {
      return -1;	
   }
    /********************************************************
    * this method checks the dice for twos and returns the 
    * score, 2 point for each two.
    * NOTE: this method may not change the original order of 
    * the Dice.
    *
    * @param a set of 5 dice
    * @return the score
    ***********************************************************/
	public static int twosScore(Dice aDice) 
   {
	   return -1;		
	}
    /********************************************************
    * This method checks to see that there are three dice
    * of one kind and returns the sum of the dice if true.
    * If there is not three of a kind, return 0.
    * A Yahtzee is automatically three of a kind.
    * NOTE: this method may not change the original order of 
    * the Dice.
    *
    * @param a set of 5 dice
    * @return the score
    ***********************************************************/
	public static int kind3Score(Dice aDice) 
   {
	   return -1;	      
	}
    /********************************************************
    * this method checks the dice for a large straight. A 
    * large straight is 5 dice in sequential values. 1,2,3,4,5 or
    * 2,3,4,5,6 are the only large straights possible.
    * If a large straight is found return 40; otherwise return 0
    * NOTE: this method may not change the original order of 
    * the Dice.
    * A Yahtzee is automatically a large straight.
    *
    * @param a set of 5 dice
    * @return the score
    ***********************************************************/
	public static int largeScore(Dice aDice) 
   {
	   return -1;			
	}
    /********************************************************
    * this method checks the dice for fours and returns the 
    * score, 4 points for each four.
    * NOTE: this method may not change the original order of 
    * the Dice.
    *
    * @param a set of 5 dice
    * @return the score
    ***********************************************************/
	public static int fourScore(Dice aDice) 
   {
	   return -1;		
	}
    /********************************************************
    * this method checks the dice for four of a kind and
    * returns the score which is the sum of the dice.
    * If there are not four of the same die value, return 0.
    * NOTE: this method may not change the original order of 
    * the Dice.
    * A Yahtzee is automatically a four of a kind.
    *
    * @param a set of 5 dice
    * @return the score
    ***********************************************************/
	public static int kind4Score(Dice aDice) 
   {
	   return -1;		
	}
    /********************************************************
    * this method checks the dice for Yahtzee and returns the 
    * score, 50 points if all dice values are the same, 0 
    * otherwise.
    *
    * NOTE: this method may not change the original order of 
    * the Dice.    
    *
    * @param a set of 5 dice
    * @return the score
    ***********************************************************/
	public static int yahtzeeScore(Dice aDice) 
   {
	   return -1;	  
	}
    /********************************************************
    * this method simply returns the sum of the face values
    * of each of the die in dice.
    * NOTE: this method may not change the original order of 
    * the Dice.
    *
    * @param a set of 5 dice
    * @return the score
    ***********************************************************/
	public static int chanceScore(Dice aDice) 
   {
	   return -1;	
	}
}
