public int compareTo(Deck deck) {
        
        if (deck.cardArray.length > cardArray.length)
            return -1;
        else if (deck.cardArray.length < cardArray.length)
            return 1;
        
        int r;
        for (int i = 0; i < cardArray.length; i++)
        {
            r = cardArray[i].compareTo(deck.cardArray[i]);
            if (r != 0) { return r; }
        }
        return 0;
    }