Class: PokerRanking::HandType::ThreeOfAKind

Inherits:
Base
  • Object
show all
Defined in:
lib/hand_type/three_of_a_kind.rb

Instance Attribute Summary

Attributes inherited from Base

#cards

Instance Method Summary collapse

Methods inherited from Base

#cards_for_values_and_kickers, #cards_in_straight, #highest_same_value, #highest_same_value_except, #initialize, #kickers, #n_of_a_kind?, #second_value, #straight_value_of

Constructor Details

This class inherits a constructor from PokerRanking::HandType::Base

Instance Method Details

#cards_usedObject



26
27
28
# File 'lib/hand_type/three_of_a_kind.rb', line 26

def cards_used
  cards_for_values_and_kickers value
end

#handles?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/hand_type/three_of_a_kind.rb', line 6

def handles?
  n_of_a_kind? 3
end

#nameObject



22
23
24
# File 'lib/hand_type/three_of_a_kind.rb', line 22

def name
  'three of a kind'
end

#number_of_kickersObject



10
11
12
# File 'lib/hand_type/three_of_a_kind.rb', line 10

def number_of_kickers
  2
end

#rankObject



14
15
16
# File 'lib/hand_type/three_of_a_kind.rb', line 14

def rank
  3
end

#valueObject



18
19
20
# File 'lib/hand_type/three_of_a_kind.rb', line 18

def value
  highest_same_value 3
end