card_deck 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/card_deck.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd7691dfe8a8198b2af07624449f799148a78f0b
|
4
|
+
data.tar.gz: e860aed43b51d026c1235d039bd97e5d019eb7df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b153f724b90b457e5ebd3e77c4c551f0b701b558d3ed927206ce0d2e282689670c67602195f0228d3b39815b65164a2242117722ccd81df7ef1a4aba76afcdba
|
7
|
+
data.tar.gz: 7bba989982a40cb920f161a0dd6cc0dd05e2d835cc33dc176257607d32a2b037d2c165b31ec61dce272213a8654395d994f6bb818a741c33c174890788f78772
|
data/lib/card_deck.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# The gem
|
2
2
|
module CardDeck
|
3
3
|
# Gem Version
|
4
|
-
VERSION = "0.2.
|
4
|
+
VERSION = "0.2.1"
|
5
5
|
# Errors for when you incorrectly use a card.
|
6
6
|
class CardError < StandardError; end
|
7
7
|
class Card # The central part of any card game. It is what makes card games 'Card' games.
|
@@ -10,7 +10,7 @@
|
|
10
10
|
# Legal arguments for parameter num in Card#new.
|
11
11
|
NUM = %w(Ace King Queen Jack Joker) + (2..10).to_a
|
12
12
|
# Legal arguments for parameter suit in Card#new
|
13
|
-
SUIT = [HEARTS, SPADES, DIAMONDS, CLUBS
|
13
|
+
SUIT = [HEARTS, SPADES, DIAMONDS, CLUBS]
|
14
14
|
# The card's number. Must be Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King, or Joker
|
15
15
|
attr_accessor :num
|
16
16
|
# The card's suit. Must be Spades, Diamonds, Clubs, Hearts, or nil.
|
@@ -54,4 +54,4 @@
|
|
54
54
|
@cards.push Card.new(num, suit)
|
55
55
|
end
|
56
56
|
end
|
57
|
-
end
|
57
|
+
end
|