ofcp_scoring 0.0.4 → 0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
- metadata.gz: 8457e930b8b6711d28dd9da8e34e9dae6bcb012c
4
- data.tar.gz: 864b1a95f9b834fe2d0905a572ac438ed4bda72e
3
+ metadata.gz: 1092a3679ad8f85c220160f567d2b9911d769269
4
+ data.tar.gz: 70d28ce0eeb101901999f5678126ef282e539714
5
5
  !binary "U0hBNTEy":
6
- metadata.gz: 38948030ff8d8314490e925a1c5426e9fb911ece1427a638e62d23665cea05bac67e5fdfa2d20bd3cf72f61cdaee9826166e6d45bb1394603bfc9ae482c5406f
7
- data.tar.gz: aea3d15190f642839abdf16fe75f00fbd77ccee5515875df6f75fffbe59b8281e35e85154b326566d724dc6afa8cff9e78f3384a6a1c0c8059fb3db024885813
6
+ metadata.gz: f3d4926b9e0aff65df7c17563249142d8f84b27f55d63e666a8265cdb50de6d17af91fafba4630b87f676a2453f9bb7935436866743569c6c5268681e2a374a0
7
+ data.tar.gz: 8c3457838c6bb8bcefbe73776db1f57d6b2722d18575dde66ab2c1f114858509e49dc56811d319b986c8a079106b7a48a8d57e468c28d55ae5e19025d2ab71a9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ofcp_scoring (0.0.3)
4
+ ofcp_scoring (0.0.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -6,7 +6,7 @@ class OfcpScoring::HandOrganizer
6
6
  sorted_ranks = []
7
7
  hand.each do |card|
8
8
  ranks_only[card[0..-2]] += 1
9
- suits_only[card[1]] += 1
9
+ suits_only[card.match(/[s,c,d,h]/)[0]] += 1
10
10
  case card[0]
11
11
  when "A"
12
12
  sorted_ranks << 1
@@ -1,3 +1,3 @@
1
1
  module OfcpScoring
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -15,6 +15,12 @@ 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
+ end
19
+
20
+ it "should know the suits of the cards" do
21
+ hand = %w(10c 10d 10h 10s As)
22
+ sut = OfcpScoring::HandOrganizer.new
23
+ organized = sut.organize(hand)
24
+ expect(organized.suits).to eq({"c"=>1, "d"=>1, "h" => 1, "s" => 2})
19
25
  end
20
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ofcp_scoring
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clayton Lengel-Zigich