private static Hand isPair(Card[] allCards) {
        Hand h = new Hand();
        int cardsALike = 0;
        ArrayList<Card> pair = new ArrayList<>();
        boolean found = false;
        for (int j = 0; j < allCards.length; j++) {
            Card firstCard = allCards[j];
            if (!found) {
                for (int k = 0; k < allCards.length; k++) {
                    Card secondCard = allCards[k];
                    if (firstCard.getNumber() == secondCard.getNumber() && firstCard.getColour() != secondCard.getColour()) {
                        if (pair.isEmpty()) {
                            pair.add(firstCard);
                            pair.add(secondCard);
                            cardsALike = 2;
                        }
                    }
                }
                if (cardsALike == 2) {
                    ArrayList<Card> cardsRemaining = new ArrayList<>();
                    for (int i = 0; i < allCards.length; i++) {
                        Card card = allCards[i];
                        if (pair.get(0).getNumber() != card.getNumber()) {
                            cardsRemaining.add(card);
                        }
                    }
                    Card[] temp = findHighestCards(listToArray(cardsRemaining), 3);
                    pair.add(temp[0]);
                    pair.add(temp[1]);
                    pair.add(temp[2]);
                    h.setHand(listToArray(pair));
                    h.setIndex(Hand.PAIR);
                    found = true;
                } else {
                    cardsALike = 0;
                    pair = new ArrayList<>();
                }
            }
        }
        return h;
    }