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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/99_game.rb +1 -4
  3. data/spec/99spec.rb +2 -2
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75eafdc6f950f1967fd0b6582659368af08b035e
4
- data.tar.gz: 4b0880db38e4a6a8a02ca34851b9378d834b5e02
3
+ metadata.gz: 30ae4069e621a9c88f1863df08986026ee921183
4
+ data.tar.gz: 914762fed37089ec68abc59d33f661aaa7578f20
5
5
  SHA512:
6
- metadata.gz: 387c47b67b3b9d635b3a52d35aaccee27a2479d34447a7eaa02f40acf0cd33bccd1d557dcb771de2c05742aaae5b4687f3387a507eedd449e18f395e4bce934c
7
- data.tar.gz: ad8f3014aca2c74572c09e320054bcc45e5566b373676ceca20e2617af9fb7c2bee79b029aef10cf34ef3be76e8d5f0722fbe88ff1004fcc27f4c395d1189c64
6
+ metadata.gz: f51081a2ed2bfea6ee3d7d62fac9dad72b0942ac4fff7fc13a6b69c8c456cb24bf126d8ef75ed59b3b1827d86d638979dc3e2d20c8226bc62b20698e26252beb
7
+ data.tar.gz: bb39a9eb7a453e27edfd96017482e90442018bda95991493bff704aad8dfd684ec79cdd6c207d84838a063720123a702b496b4835962fdaa11b5ad897f0caa2c
@@ -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__
@@ -1,5 +1,5 @@
1
1
  require_relative "spec_helper"
2
- require "99"
2
+ require "99_game"
3
3
  describe "$deck" do
4
4
  describe "#length" do
5
5
  it "should == 54" do; expect($deck.length + 6).to eq 54; end
@@ -44,4 +44,4 @@ describe "Hand" do
44
44
  end
45
45
  end
46
46
  end
47
-
47
+
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.2
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: '0'
45
+ version: 1.3.1
46
46
  requirements: []
47
47
  rubyforge_project:
48
48
  rubygems_version: 2.3.0