ofcp_scoring 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
- metadata.gz: 10da65d396f4b5efaf31275afdf8100f8f2b7a8c
4
- data.tar.gz: 5ea2afe03038edb5e9b4cd8408d255659c5c1d93
3
+ metadata.gz: c7f373aba74942b3828e90a36cd467e752f816e8
4
+ data.tar.gz: 92dabf776a940fe30c088b859746aceea706e5d1
5
5
  !binary "U0hBNTEy":
6
- metadata.gz: 9f1e47a0593cf4276ed52dd9f77e848f9f87f45607e3657c4cdcf7167b33673bdc72d7cfd2960b97c41b79ae1a4914b29fa0b56fe8b9e187c89c5721c6b4aab6
7
- data.tar.gz: 5ba7cafebbc4e425ac7106b92410ef9d078a87d1be2e9c3f4deda9f1b36dc6efaf898f593aaf13c75951e4492ecae6c3e6b8d54e1fae963b8e3a266837528603
6
+ metadata.gz: e31b00a5149351a123e06856fff9ba478c070f2d6fc5f696d78c5fb8fc790a6852ba44c42650adee0933ef73b868bbfc8c48fc0e12dd5d27178d4f2195d5bdab
7
+ data.tar.gz: a0df5bac673ab6434016d5a92581165e740fcc80f83f9061c2c65b05bd64deeb2727419225d3b70c1eb88c5c70a9cc0669793df6cadd3d00b0d058e250a797cd
data/.gitignore CHANGED
@@ -1,2 +1,4 @@
1
1
  coverage/
2
2
  ofcp.sublime-*
3
+ *.gem
4
+ .DS_Store
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ofcp_scoring (0.0.1)
4
+ ofcp_scoring (0.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -35,7 +35,7 @@ With Royalties you receive the following points for Back hands:
35
35
  * 10 for StraightFlush
36
36
  * 8 for Quads
37
37
  * 6 for a Full House
38
- * 4 for a OfcpScoring::Flush
38
+ * 4 for a Flush
39
39
  * 2 for a Straight
40
40
 
41
41
  You receive the following points for Middle hands:
@@ -43,7 +43,7 @@ You receive the following points for Middle hands:
43
43
  * 20 for StraightFlush
44
44
  * 16 for Quads
45
45
  * 2 for a Full House
46
- * 8 for a OfcpScoring::Flush
46
+ * 8 for a Flush
47
47
  * 4 for a Straight
48
48
 
49
49
  You receive the following points for Front hands (the 3 card hand):
@@ -28,7 +28,7 @@ class OfcpScoring::HandOrganizer
28
28
 
29
29
  private
30
30
  def build_organized_hand(ranks, suits, sorted)
31
- params = {:ranks => sorted}
31
+ params = {:ranks => sorted, :suits => suits}
32
32
 
33
33
  params.merge!({:two_cards_match => true}) if ranks.values.include?(2)
34
34
  params.merge!({:two_different_cards_match => true}) if ranks.find_all{|k,v| v == 2}.size > 1
@@ -7,6 +7,10 @@ class OfcpScoring::OrganizedHand
7
7
  @hand[:ranks]
8
8
  end
9
9
 
10
+ def suits
11
+ @hand[:suits]
12
+ end
13
+
10
14
  def two_cards_match?
11
15
  @hand[:two_cards_match]
12
16
  end
@@ -1,2 +1,3 @@
1
+ require_relative 'straight'
1
2
  class OfcpScoring::StraightFlush < OfcpScoring::Straight
2
3
  end
@@ -1,3 +1,3 @@
1
1
  module OfcpScoring
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -15,5 +15,6 @@ describe "Integration" do
15
15
  expect(organized.two_cards_match?).to be
16
16
  expect(organized.two_different_cards_match?).to_not be
17
17
  expect(organized.ranks).to eq([1,2,4,12,12])
18
+ expect(organized.suits).to eq({"c"=>2, "d"=>3})
18
19
  end
19
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ofcp_scoring
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clayton Lengel-Zigich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-26 00:00:00.000000000 Z
11
+ date: 2013-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -59,7 +59,6 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - .DS_Store
63
62
  - .autotest
64
63
  - .gitignore
65
64
  - .rspec
@@ -69,7 +68,6 @@ files:
69
68
  - LICENSE.txt
70
69
  - README.md
71
70
  - Rakefile
72
- - lib/.DS_Store
73
71
  - lib/ofcp_scoring.rb
74
72
  - lib/ofcp_scoring/chinese_poker_hand.rb
75
73
  - lib/ofcp_scoring/flush.rb
@@ -91,7 +89,6 @@ files:
91
89
  - lib/ofcp_scoring/three_of_a_kind.rb
92
90
  - lib/ofcp_scoring/two_pair.rb
93
91
  - lib/ofcp_scoring/version.rb
94
- - ofcp_scoring-0.0.1.gem
95
92
  - ofcp_scoring.gemspec
96
93
  - spec/acceptance_spec.rb
97
94
  - spec/chinese_poker_hand_categorizer_spec.rb
data/.DS_Store DELETED
Binary file
data/lib/.DS_Store DELETED
Binary file
Binary file