deck 1.0.4 → 1.0.5

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.
@@ -23,6 +23,9 @@ class Card
23
23
  end
24
24
  end
25
25
 
26
+ def inspect
27
+ to_s
28
+ end
26
29
 
27
30
  def suit
28
31
  @suit.capitalize
@@ -31,6 +31,10 @@ class Deck
31
31
  100.times { @cards.push @cards.delete_at(rand(size-1)) }
32
32
  end
33
33
 
34
+ def inspect
35
+ to_s
36
+ end
37
+
34
38
  def each
35
39
  @cards.each { |card| yield card }
36
40
  end
@@ -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
@@ -6,4 +6,8 @@ class Hand < Deck
6
6
  @cards = []
7
7
  end
8
8
 
9
+ def inspect
10
+ @cards.each{|e| e.to_s}
11
+ end
12
+
9
13
  end
@@ -1,3 +1,3 @@
1
1
  class Deck
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
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.4
4
+ version: 1.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: