poker-ranking 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/card.rb +2 -1
- data/lib/poker_ranking.rb +1 -1
- metadata +1 -1
data/lib/card.rb
CHANGED
@@ -3,6 +3,7 @@ module PokerRanking
|
|
3
3
|
class PokerRanking::Card
|
4
4
|
|
5
5
|
RANKS = %w(2 3 4 5 6 7 8 9 10 Jack Queen King Ace)
|
6
|
+
SHORT_RANKS = %w(2 3 4 5 6 7 8 9 10 J Q K A)
|
6
7
|
SUITS = %w(Hearts Diamonds Spades Clubs)
|
7
8
|
|
8
9
|
def initialize(card_data)
|
@@ -24,7 +25,7 @@ module PokerRanking
|
|
24
25
|
end
|
25
26
|
|
26
27
|
def data
|
27
|
-
{ rank: @
|
28
|
+
{ rank: SHORT_RANKS[@value - 2], suit: @suit.downcase }
|
28
29
|
end
|
29
30
|
|
30
31
|
def ==(other_card)
|
data/lib/poker_ranking.rb
CHANGED