Class: OfcpScoring::Flush

Inherits:
RankedHand show all
Defined in:
lib/ofcp_scoring/flush.rb

Direct Known Subclasses

RoyalFlush

Constant Summary

Constants inherited from RankedHand

RankedHand::RANKINGS

Instance Method Summary collapse

Methods inherited from RankedHand

#compare_ranks, #grouped_ranks, #initialize, #rank_name, #ranks, #suits

Constructor Details

This class inherits a constructor from OfcpScoring::RankedHand

Instance Method Details

#<=>(other) ⇒ Object



3
4
5
6
# File 'lib/ofcp_scoring/flush.rb', line 3

def <=>(other)
  return super if super
  highest_flush_card <=> other.highest_flush_card
end

#highest_flush_cardObject



8
9
10
# File 'lib/ofcp_scoring/flush.rb', line 8

def highest_flush_card
  ranks.max
end