class OfcpScoring::FourOfAKind

Public Instance Methods

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