deck 1.0.8 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,7 +28,7 @@ class Deck
28
28
  end
29
29
 
30
30
  def shuffle!
31
- 100.times { @cards.push @cards.delete_at(rand(size-1)) }
31
+ 1000.times { @cards.push @cards.delete_at(rand(size-1)) }
32
32
  end
33
33
 
34
34
  def inspect
@@ -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[n-1] << deck.draw
26
+ (1..hands.size).each do |n|
27
+ hands[n-1] << deck.draw
28
+ end
28
29
  end
29
- end
30
+ self
30
31
  end
31
32
 
32
33
  end
@@ -7,7 +7,7 @@ class Hand < Deck
7
7
  end
8
8
 
9
9
  def inspect
10
- @cards.map{|e| e.to_s}
10
+ @cards.inspect
11
11
  end
12
12
 
13
13
  end
@@ -1,3 +1,3 @@
1
1
  class Deck
2
- VERSION = "1.0.8"
2
+ VERSION = "1.1.0"
3
3
  end
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.8
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-04 00:00:00.000000000 +01:00
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