class OfcpScoring::Pair

Public Instance Methods

<=>(other) click to toggle source
Calls superclass method OfcpScoring::RankedHand#<=>
# File lib/ofcp_scoring/pair.rb, line 3
def <=>(other)
  return super if super
  if highest_paired_card == other.highest_paired_card
    compare_ranks(other)
  else
    highest_paired_card <=> other.highest_paired_card
  end
end
highest_paired_card() click to toggle source
# File lib/ofcp_scoring/pair.rb, line 12
def highest_paired_card
  grouped_ranks.map{|card,matches| card if matches.size == 2}.compact.first
end