static boolean isThereAPair(Hand hand) {

      for (int x =0; x < hand.size();x++){
            int count = 0; 
            for(int y=0;y < hand.size();y++)
            {
                 if (hand.get(x).getValue() == hand.get(y).getValue())
                     count++;
                 if (count == 2)
                       return true; // a pair
            }}
     return false;
    
 }