deck 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/deck/card.rb +3 -0
- data/lib/deck/deck.rb +4 -0
- data/lib/deck/game.rb +4 -1
- data/lib/deck/hand.rb +4 -0
- data/lib/deck/version.rb +1 -1
- metadata +1 -1
data/lib/deck/card.rb
CHANGED
data/lib/deck/deck.rb
CHANGED
data/lib/deck/game.rb
CHANGED
@@ -15,7 +15,9 @@ class Game
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
-
|
18
|
+
def inspect
|
19
|
+
"#{to_s} with #{@number_of_hands} hands each with #{@number_of_cards} cards"
|
20
|
+
end
|
19
21
|
|
20
22
|
def deal(shuffle = true)
|
21
23
|
deck.shuffle! if shuffle
|
@@ -26,4 +28,5 @@ class Game
|
|
26
28
|
end
|
27
29
|
end
|
28
30
|
|
31
|
+
alias :deal! :deal
|
29
32
|
end
|
data/lib/deck/hand.rb
CHANGED
data/lib/deck/version.rb
CHANGED