public static CardCombination getSameCardsOrHighestCard(
			ArrayList<Card> tempHandCards) {
		CardCombinationEnum cardCombinationEnum = null;
		// Sort the given hand cards just to be sure that the order is correct
		sortHand(tempHandCards);

		// Make a copy of the list, so that the given list can be manipulated
		ArrayList<Card> clonedHandCards = (ArrayList<Card>) tempHandCards
				.clone();
		ArrayList<Card> sameCards = new ArrayList<Card>();

		// Avoid null pointers
		if (clonedHandCards != null && clonedHandCards.size() >= 1) {
			Card currentCard = clonedHandCards.get(0);

			sameCards.add(currentCard);
			// Remove the element from the original list, because it is handled
			// now
			tempHandCards.remove(currentCard);

			// Compare the values of the next cards until they differ
			for (int j = 1; j < clonedHandCards.size(); j++) {
				Card nextCard = clonedHandCards.get(j);
				if (nextCard.getCardValue() == currentCard.getCardValue()) {
					// Add the card to the same card pool
					sameCards.add(clonedHandCards.get(j));
					// Remove the just analyzed and handled card from the
					// original list
					tempHandCards.remove(nextCard);
				}
			}
		}
		switch (sameCards.size()) {
		case 1:
			cardCombinationEnum = CardCombinationEnum.HIGHEST_CARD;
			break;
		case 2:
			cardCombinationEnum = CardCombinationEnum.ONE_PAIR;
			break;
		case 3:
			cardCombinationEnum = CardCombinationEnum.THREE_OF_A_KIND;
			break;
		case 4:
			cardCombinationEnum = CardCombinationEnum.FOUR_OF_A_KIND;
			break;
		}
		return new CardCombination(cardCombinationEnum, sameCards);
	}