99_game 1.0.2 → 1.0.3.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/99_game.rb +1 -4
- data/spec/99spec.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30ae4069e621a9c88f1863df08986026ee921183
|
4
|
+
data.tar.gz: 914762fed37089ec68abc59d33f661aaa7578f20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f51081a2ed2bfea6ee3d7d62fac9dad72b0942ac4fff7fc13a6b69c8c456cb24bf126d8ef75ed59b3b1827d86d638979dc3e2d20c8226bc62b20698e26252beb
|
7
|
+
data.tar.gz: bb39a9eb7a453e27edfd96017482e90442018bda95991493bff704aad8dfd684ec79cdd6c207d84838a063720123a702b496b4835962fdaa11b5ad897f0caa2c
|
data/lib/99_game.rb
CHANGED
@@ -32,9 +32,6 @@ class Hand # Creates a object that holds and can play cards
|
|
32
32
|
attr_reader :hand
|
33
33
|
def initialize; @hand = [$deck.shift, $deck.shift, $deck.shift]; end
|
34
34
|
def play(card)
|
35
|
-
legal = false
|
36
|
-
for cards in @hand; legal = true if cards.num == card.num; end
|
37
|
-
raise CardError, "\aCard not allowed\a" unless legal
|
38
35
|
if card.num == "King"; $value = 99
|
39
36
|
elsif card.num == "Joker"; $value = 0
|
40
37
|
else; $value += card.value
|
@@ -79,4 +76,4 @@ $deck = Array.new
|
|
79
76
|
end
|
80
77
|
2.times {$deck.push(Card.new("Joker"))}
|
81
78
|
$deck.shuffle!
|
82
|
-
__END__
|
79
|
+
__END__
|
data/spec/99spec.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: 99_game
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zachary Perlmutter
|
@@ -40,9 +40,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
40
40
|
version: 2.0.0
|
41
41
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
42
42
|
requirements:
|
43
|
-
- - "
|
43
|
+
- - ">"
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
45
|
+
version: 1.3.1
|
46
46
|
requirements: []
|
47
47
|
rubyforge_project:
|
48
48
|
rubygems_version: 2.3.0
|