class OfcpScoring::ThreeOfAKind

Public Instance Methods

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