private List<Integer> cardsOfSameRankList(List<Card> cards) {
        int howManyCardsOfTheSameRank = 1;
        int previousRankValue = cards.get(0).getRank().getValue();
        List<Integer> cardsOfSameRankList = new ArrayList<Integer>();

        for (int i = 1; i < cards.size(); i++) {
            int currentRankValue = cards.get(i).getRank().getValue();
            if (previousRankValue == currentRankValue) {
                howManyCardsOfTheSameRank++;
            } else {
                cardsOfSameRankList.add(howManyCardsOfTheSameRank);
                howManyCardsOfTheSameRank = 1;
                previousRankValue = currentRankValue;
            }
        }
        cardsOfSameRankList.add(howManyCardsOfTheSameRank);

        Collections.sort(cardsOfSameRankList);
        Collections.reverse(cardsOfSameRankList);

        return cardsOfSameRankList;
    }