Class: PokerRanking::HandType::FourOfAKind
- Inherits:
-
Base
- Object
- Base
- PokerRanking::HandType::FourOfAKind
show all
- Defined in:
- lib/hand_type/four_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, #n_of_a_kind?, #second_value, #straight_value_of
Instance Method Details
#cards_used ⇒ Object
31
32
33
|
# File 'lib/hand_type/four_of_a_kind.rb', line 31
def cards_used
cards_for_values_and_kickers value
end
|
#handles? ⇒ Boolean
6
7
8
|
# File 'lib/hand_type/four_of_a_kind.rb', line 6
def handles?
n_of_a_kind? 4
end
|
#kickers ⇒ Object
because the kicker could be part of a pair
23
24
25
|
# File 'lib/hand_type/four_of_a_kind.rb', line 23
def kickers
[[super,highest_same_value_except(2,value)].flatten.max]
end
|
#name ⇒ Object
27
28
29
|
# File 'lib/hand_type/four_of_a_kind.rb', line 27
def name
'four of a kind'
end
|
#number_of_kickers ⇒ Object
10
11
12
|
# File 'lib/hand_type/four_of_a_kind.rb', line 10
def number_of_kickers
1
end
|
#rank ⇒ Object
14
15
16
|
# File 'lib/hand_type/four_of_a_kind.rb', line 14
def rank
7
end
|
#value ⇒ Object
18
19
20
|
# File 'lib/hand_type/four_of_a_kind.rb', line 18
def value
highest_same_value 4
end
|