def values_desc_by_occurency
      values = cards.map(&:value)

      values.sort do |a, b|
        coefficient_occurency = (values.count(a) <=> values.count(b))

        coefficient_occurency.zero? ? -(a <=> b) : -coefficient_occurency
      end
    end
def values_desc_by_occurency
      values = cards.map(&:value)

      values.sort do |a, b|
        coefficient_occurency = (values.count(a) <=> values.count(b))

        coefficient_occurency.zero? ? -(a <=> b) : -coefficient_occurency
      end
    end
Make descending order primary by occurency and secondary by value