deck 1.0.8 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/deck/deck.rb +1 -1
- data/lib/deck/game.rb +4 -3
- data/lib/deck/hand.rb +1 -1
- data/lib/deck/version.rb +1 -1
- metadata +2 -2
data/lib/deck/deck.rb
CHANGED
data/lib/deck/game.rb
CHANGED
@@ -22,11 +22,12 @@ class Game
|
|
22
22
|
|
23
23
|
def deal(shuffle = true)
|
24
24
|
deck.shuffle! if shuffle
|
25
|
-
(1..hands.size).each do |n|
|
26
25
|
number_of_cards.times do
|
27
|
-
hands
|
26
|
+
(1..hands.size).each do |n|
|
27
|
+
hands[n-1] << deck.draw
|
28
|
+
end
|
28
29
|
end
|
29
|
-
|
30
|
+
self
|
30
31
|
end
|
31
32
|
|
32
33
|
end
|
data/lib/deck/hand.rb
CHANGED
data/lib/deck/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-08-
|
12
|
+
date: 2011-08-05 00:00:00.000000000 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
description: represent playing cards, hands, decks and games
|