poker_odds 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: 727beb1f40c45f4ab9b77d0a2b7c21da81b8fc8105414f516fdb04bed4e4bded
4
- data.tar.gz: 107c85dabd7f0c4a68900fef7fe91e1d55604422e58403d5b95dfc3323838478
3
+ metadata.gz: d9b276397f0241270e9e70261add2fae5c6a018c0d132ffc65a6ad7027f8a91f
4
+ data.tar.gz: 3d3cdf4f18c3c42c3f0d1792dc94f7fca4c83f9040ad02bd24a2f0834b11f523
5
5
  SHA512:
6
- metadata.gz: 41eecbb09877d4da4e99adacacb539f620b3616ace9584ad8c6cdc0a5d952b2db48e33f6b34fbecf4b36c8e9a0300541762c43ddf77871f4e9ffc848eaab89f5
7
- data.tar.gz: b0e379b966eab71eb0d1eddac1f43cc54ff59f2357daf7f371598a8467b77d8da6ed63a6581685bf2c1cd9ad7cb4341a686df68c6d2147fa2d3bb231a196a1ab
6
+ metadata.gz: 5ed48a3fbb3116018cb60e6865969f20fff70e346bf28d73e464f1f2ef86c781bcd23a6ef8f4d0d4b1e0b9eeed0362b75c1d429b2691dcd1ee71051eac5ac857
7
+ data.tar.gz: 808b5bb6a3f9bf08d261b334e254add15e3b33f19cca02d34534bbaaae41822aa2df9006b9ce90e42d308e9276950eabb09b33b2487f555c9b430fa90af16ff9
@@ -80,15 +80,16 @@ module PokerOdds
80
80
 
81
81
  s = z.size.to_f
82
82
 
83
+ binding.pry
83
84
  hands.each_with_object({}) do |hand, h|
85
+ binding.pry
84
86
  win_hands = z.select { |a,b| b[:win_hands]&.include?(hand) }
85
87
  win_rate = win_hands.size / s
86
- h = {}
87
- h[:hand] = hand
88
- h[:win_rate] = win_rate
89
- h[:lose_rate] = z.count { |a,b| b[:lose_hands]&.include?(hand) } / s
90
- h[:tie_rate] = z.count { |a,b| b[:tie_hands]&.include?(hand) } / s
91
- h[:outs] = win_hands.keys if win_rate > 0.5
88
+ h[hand] = {}
89
+ h[hand][:win_rate] = win_rate
90
+ h[hand][:lose_rate] = z.count { |a,b| b[:lose_hands]&.include?(hand) } / s
91
+ h[hand][:tie_rate] = z.count { |a,b| b[:tie_hands]&.include?(hand) } / s
92
+ h[hand][:outs] = win_hands.keys if win_rate > 0.5
92
93
  end
93
94
  end
94
95
 
@@ -1,3 +1,3 @@
1
1
  module PokerOdds
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poker_odds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kyohah
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
11
  date: 2022-07-07 00:00:00.000000000 Z
@@ -123,7 +123,7 @@ licenses:
123
123
  metadata:
124
124
  homepage_uri: https://github.com/kyohah/poker_odds
125
125
  source_code_uri: https://github.com/kyohah/poker_odds
126
- post_install_message:
126
+ post_install_message:
127
127
  rdoc_options: []
128
128
  require_paths:
129
129
  - lib
@@ -138,8 +138,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  requirements: []
141
- rubygems_version: 3.0.3.1
142
- signing_key:
141
+ rubygems_version: 3.2.32
142
+ signing_key:
143
143
  specification_version: 4
144
144
  summary: Write a short summary, because RubyGems requires one.
145
145
  test_files: []