package cse1030.games;
import java.util.Collections;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
/**
* A utility class that encodes a subset of the rules for the game Yahtzee.
*
* @author CSE1030_F13_14
*
*/
public class Yahtzee {
/**
* You can use the following class constants for indexes in lists
* of dice.
*/
private static int FIRST = 0;
private static int SECOND = 1;
private static int THIRD = 2;
private static int FOURTH = 3;
private static int FIFTH = 4;
private Yahtzee() {
// private and empty by design
}
/**
* The number of six-sided dice used in a standard game of Yahtzee.
*/
public static final int NUMBER_OF_DICE = 5;
/**
* Returns true
if the list contains a three of a kind.
*
*
* A three of a kind is defined as at least three dice having the same
* value.
*
* @param dice
* list of dice
* @pre. dice.size() == Yahtzee.NUMBER_OF_DICE
* @return true
if the list contains a three of a kind
*/
public static boolean isThreeOfAKind(List