Class: PokerRanking::HandType::Straight
- Inherits:
-
Base
- Object
- Base
- PokerRanking::HandType::Straight
show all
- Defined in:
- lib/hand_type/straight.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?, #number_of_kickers, #second_value, #straight_value_of
Instance Method Details
#cards_used ⇒ Object
21
22
23
|
# File 'lib/hand_type/straight.rb', line 21
def cards_used
cards_in_straight(cards)[-5..-1]
end
|
#handles? ⇒ Boolean
5
6
7
|
# File 'lib/hand_type/straight.rb', line 5
def handles?
value > 0
end
|
#kickers ⇒ Object
25
26
27
|
# File 'lib/hand_type/straight.rb', line 25
def kickers
[]
end
|
#name ⇒ Object
17
18
19
|
# File 'lib/hand_type/straight.rb', line 17
def name
'straight'
end
|
#rank ⇒ Object
9
10
11
|
# File 'lib/hand_type/straight.rb', line 9
def rank
4
end
|
#value ⇒ Object
13
14
15
|
# File 'lib/hand_type/straight.rb', line 13
def value
straight_value_of cards
end
|