poker_odds 0.1.0 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/poker_odds/round.rb +6 -8
- data/lib/poker_odds/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f051198b6ad06d450eed6de84d7144e29f8799613a4b3afa9e51efcb361a79e
|
4
|
+
data.tar.gz: 66e2a399060eba110e929582245c50ae6e654bb8c7efa8484e02a22cb71e5fe1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 625b416f0687fcd883a399aeab7e6130453eb935450174ffef7aeb284b7a1e9742f7bdde89a58b717d635b8404176d60f04f619740dff4f028822ffaf641acf3
|
7
|
+
data.tar.gz: 107664dcfa0b07d0da2c608bf56e740b5f59ab12c3ad75ebf5c25580f0780fe28c72ba2b8a14f0ae13d2475e31b44a8b26d8d08ab1e91abcf1b2d250721b6a16
|
data/lib/poker_odds/round.rb
CHANGED
@@ -80,16 +80,14 @@ module PokerOdds
|
|
80
80
|
|
81
81
|
s = z.size.to_f
|
82
82
|
|
83
|
-
hands.each_with_object(
|
83
|
+
hands.each_with_object({}) do |hand, h|
|
84
84
|
win_hands = z.select { |a,b| b[:win_hands]&.include?(hand) }
|
85
85
|
win_rate = win_hands.size / s
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
outs: win_rate > 0.5 ? [] : win_hands.keys
|
92
|
-
}
|
86
|
+
h[hand] = {}
|
87
|
+
h[hand][:win_rate] = win_rate
|
88
|
+
h[hand][:lose_rate] = z.count { |a,b| b[:lose_hands]&.include?(hand) } / s
|
89
|
+
h[hand][:tie_rate] = z.count { |a,b| b[:tie_hands]&.include?(hand) } / s
|
90
|
+
h[hand][:outs] = win_hands.keys if win_rate < 0.5
|
93
91
|
end
|
94
92
|
end
|
95
93
|
|
data/lib/poker_odds/version.rb
CHANGED
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.
|
4
|
+
version: 0.1.3
|
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.
|
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: []
|