static boolean isThereAThree(Hand hand) {
     
     for(int x = 1;x < hand.size(); x++){
     if(hand.get(x).getValue() < hand.get(x-1).getValue())
         {
             Card card1 = hand.get(x);
             Card card2 = hand.get(x-1);
             hand.setElementAt(card2, x);
             hand.setElementAt(card1, x-1);
         }}
      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 == 3)
                       return true; // three of a kind
            }}
     return false;
     
 }