pokerstats 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/checkps +6 -6
- data/lib/pokerstats/hand_statistics.rb +1 -1
- data/lib/pokerstats/player_statistics.rb +11 -10
- data/lib/pokerstats/plugins/street_bet_statistics.rb +208 -117
- data/pokerstats.gemspec +2 -2
- data/spec/hand_history_spec.rb +2 -1
- data/spec/hand_statistics_spec.rb +117 -100
- data/spec/player_statistics_spec.rb +112 -143
- data/spec/pokerstars_file_spec.rb +1 -1
- data/spec/pokerstars_hand_history_parser_spec.rb +2 -1
- metadata +36 -21
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.2.0
|
data/bin/checkps
CHANGED
@@ -89,12 +89,12 @@ def dopsfile(file, players_shown)
|
|
89
89
|
posfa = report[:t_postflop_passive].zero? ? 0.0 : [1.0 * report[:t_postflop_aggressive] / report[:t_postflop_passive],9.9].min
|
90
90
|
batt_p = display_ratio report[:t_blind_attack_opportunity_taken], report[:t_blind_attack_opportunity]
|
91
91
|
bdef_p = display_ratio report[:t_blind_defense_opportunity_taken], report[:t_blind_defense_opportunity]
|
92
|
-
cbet_flop_p = display_ratio report[:
|
93
|
-
call_cbet_flop_p = display_ratio report[:
|
94
|
-
fold_to_cbet_flop_p = display_ratio report[:
|
95
|
-
preflop_3bet_p = display_ratio report[:
|
96
|
-
call_preflop_3bet_p = display_ratio report[:
|
97
|
-
fold_to_preflop_3bet_p = display_ratio report[:
|
92
|
+
cbet_flop_p = display_ratio report[:t_f_cbet], report[:t_f_cbet_o]
|
93
|
+
call_cbet_flop_p = display_ratio report[:t_c_f_cbet], report[:t_c_f_cbet_o]
|
94
|
+
fold_to_cbet_flop_p = display_ratio report[:t_f2_f_cbet], report[:t_f2_f_cbet_o]
|
95
|
+
preflop_3bet_p = display_ratio report[:t_p_3bet], report[:t_p_3bet_o]
|
96
|
+
call_preflop_3bet_p = display_ratio report[:t_c_p_3bet], report[:t_p_4bet_o]
|
97
|
+
fold_to_preflop_3bet_p = display_ratio report[:t_f2_p_3bet], report[:t_p_4bet_o]
|
98
98
|
|
99
99
|
|
100
100
|
description = players_shown[each][/\(.*\)/]
|
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'pluggable'
|
3
3
|
require 'bigdecimal'
|
4
4
|
require 'bigdecimal/util'
|
5
|
-
require '
|
5
|
+
require 'active_support'
|
6
6
|
require File.expand_path(File.dirname(__FILE__) + '/hand_constants')
|
7
7
|
require File.expand_path(File.dirname(__FILE__) + '/hand_statistics_api')
|
8
8
|
module Pokerstats
|
@@ -64,16 +64,17 @@ module Pokerstats
|
|
64
64
|
aggregate_boolean_statistic each_player, reports, :t_blind_defense_opportunity_taken, :is_blind_defense_opportunity_taken
|
65
65
|
aggregate_boolean_statistic each_player, reports, :t_pfr_opportunity, :is_pfr_opportunity
|
66
66
|
aggregate_boolean_statistic each_player, reports, :t_pfr_opportunity_taken, :is_pfr_opportunity_taken
|
67
|
-
aggregate_boolean_statistic each_player, reports, :
|
68
|
-
aggregate_boolean_statistic each_player, reports, :
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
67
|
+
aggregate_boolean_statistic each_player, reports, :t_f_cbet, :f_cbet
|
68
|
+
aggregate_boolean_statistic each_player, reports, :t_f_cbet_o, :f_cbet_o
|
69
|
+
aggregate_boolean_statistic each_player, reports, :t_c_f_cbet, :c_f_cbet
|
70
|
+
aggregate_boolean_statistic each_player, reports, :t_c_f_cbet_o, :c_f_cbet_o
|
71
|
+
aggregate_boolean_statistic each_player, reports, :t_f2_f_cbet, :f2_f_cbet
|
72
|
+
aggregate_boolean_statistic each_player, reports, :t_f2_f_cbet_o, :f2_f_cbet_o
|
73
|
+
aggregate_boolean_statistic each_player, reports, :t_p_3bet, :p_3bet
|
74
|
+
aggregate_boolean_statistic each_player, reports, :t_p_3bet_o, :p_3bet_o
|
75
|
+
aggregate_boolean_statistic each_player, reports, :t_c_p_3bet, :c_p_3bet
|
76
|
+
aggregate_boolean_statistic each_player, reports, :t_f2_p_3bet, :f2_p_3bet
|
77
|
+
aggregate_boolean_statistic each_player, reports, :t_p_4bet_o, :p_4bet_o
|
77
78
|
end
|
78
79
|
end
|
79
80
|
end
|
@@ -2,106 +2,131 @@ module Pokerstats
|
|
2
2
|
class StreetBetStatistics < HandStatistics::Plugin
|
3
3
|
def self.report_specification
|
4
4
|
[
|
5
|
-
[:
|
6
|
-
[:
|
7
|
-
[:
|
8
|
-
[:
|
9
|
-
[:
|
10
|
-
[:
|
11
|
-
[:
|
12
|
-
[:
|
13
|
-
[:
|
14
|
-
[:
|
15
|
-
[:
|
16
|
-
[:
|
17
|
-
[:
|
18
|
-
[:
|
19
|
-
[:
|
5
|
+
[:p_2bet, "boolean", :p_2bet?],
|
6
|
+
[:p_2bet_o, "boolean", :p_2bet_o?],
|
7
|
+
[:p_3bet, "boolean", :p_3bet?],
|
8
|
+
[:p_3bet_o, "boolean", :p_3bet_o?],
|
9
|
+
[:p_4bet, "boolean", :p_4bet?],
|
10
|
+
[:p_4bet_o, "boolean", :p_4bet_o?],
|
11
|
+
[:p_5bet_o, "boolean", :p_5bet_o?],
|
12
|
+
[:f_1bet, "boolean", :f_1bet?],
|
13
|
+
[:f_1bet_o, "boolean", :f_1bet_o?],
|
14
|
+
[:f_2bet, "boolean", :f_2bet?],
|
15
|
+
[:f_2bet_o, "boolean", :f_2bet_o?],
|
16
|
+
[:f_3bet, "boolean", :f_3bet?],
|
17
|
+
[:f_3bet_o, "boolean", :f_3bet_o?],
|
18
|
+
[:f_4bet, "boolean", :f_4bet?],
|
19
|
+
[:f_4bet_o, "boolean", :f_4bet_o?],
|
20
|
+
[:f_5bet_o, "boolean", :f_5bet_o?],
|
21
|
+
[:t_1bet, "boolean", :t_1bet?],
|
22
|
+
[:t_1bet_o, "boolean", :t_1bet_o?],
|
23
|
+
[:t_2bet, "boolean", :t_2bet?],
|
24
|
+
[:t_2bet_o, "boolean", :t_2bet_o?],
|
25
|
+
[:t_3bet, "boolean", :t_3bet?],
|
26
|
+
[:t_3bet_o, "boolean", :t_3bet_o?],
|
27
|
+
[:t_4bet, "boolean", :t_4bet?],
|
28
|
+
[:t_4bet_o, "boolean", :t_4bet_o?],
|
29
|
+
[:t_5bet_o, "boolean", :t_5bet_o?],
|
30
|
+
[:r_1bet, "boolean", :r_1bet?],
|
31
|
+
[:r_1bet_o, "boolean", :r_1bet_o?],
|
32
|
+
[:r_2bet, "boolean", :r_2bet?],
|
33
|
+
[:r_2bet_o, "boolean", :r_2bet_o?],
|
34
|
+
[:r_3bet, "boolean", :r_3bet?],
|
35
|
+
[:r_3bet_o, "boolean", :r_3bet_o?],
|
36
|
+
[:r_4bet, "boolean", :r_4bet?],
|
37
|
+
[:r_4bet_o, "boolean", :r_4bet_o?],
|
38
|
+
[:r_5bet_o, "boolean", :r_5bet_o?],
|
20
39
|
|
21
|
-
[:
|
22
|
-
[:
|
23
|
-
[:
|
24
|
-
[:
|
25
|
-
[:
|
26
|
-
[:
|
27
|
-
[:
|
28
|
-
[:
|
29
|
-
[:
|
30
|
-
[:
|
31
|
-
[:
|
32
|
-
[:
|
33
|
-
[:
|
34
|
-
[:
|
35
|
-
[:
|
36
|
-
[:
|
40
|
+
[:f2_p_1bet, "boolean", :f2_p_1bet?],
|
41
|
+
[:f2_p_2bet, "boolean", :f2_p_2bet?],
|
42
|
+
[:f2_p_3bet, "boolean", :f2_p_3bet?],
|
43
|
+
[:f2_p_4bet, "boolean", :f2_p_4bet?],
|
44
|
+
[:f2_f_1bet, "boolean", :f2_f_1bet?],
|
45
|
+
[:f2_f_2bet, "boolean", :f2_f_2bet?],
|
46
|
+
[:f2_f_3bet, "boolean", :f2_f_3bet?],
|
47
|
+
[:f2_f_4bet, "boolean", :f2_f_4bet?],
|
48
|
+
[:f2_t_1bet, "boolean", :f2_t_1bet?],
|
49
|
+
[:f2_t_2bet, "boolean", :f2_t_2bet?],
|
50
|
+
[:f2_t_3bet, "boolean", :f2_t_3bet?],
|
51
|
+
[:f2_t_4bet, "boolean", :f2_t_4bet?],
|
52
|
+
[:f2_r_1bet, "boolean", :f2_r_1bet?],
|
53
|
+
[:f2_r_2bet, "boolean", :f2_r_2bet?],
|
54
|
+
[:f2_r_3bet, "boolean", :f2_r_3bet?],
|
55
|
+
[:f2_r_4bet, "boolean", :f2_r_4bet?],
|
56
|
+
|
57
|
+
[:c_p_1bet, "boolean", :c_p_1bet?],
|
58
|
+
[:c_p_2bet, "boolean", :c_p_2bet?],
|
59
|
+
[:c_p_3bet, "boolean", :c_p_3bet?],
|
60
|
+
[:c_p_4bet, "boolean", :c_p_4bet?],
|
61
|
+
[:c_f_1bet, "boolean", :c_f_1bet?],
|
62
|
+
[:c_f_2bet, "boolean", :c_f_2bet?],
|
63
|
+
[:c_f_3bet, "boolean", :c_f_3bet?],
|
64
|
+
[:c_f_4bet, "boolean", :c_f_4bet?],
|
65
|
+
[:c_t_1bet, "boolean", :c_t_1bet?],
|
66
|
+
[:c_t_2bet, "boolean", :c_t_2bet?],
|
67
|
+
[:c_t_3bet, "boolean", :c_t_3bet?],
|
68
|
+
[:c_t_4bet, "boolean", :c_t_4bet?],
|
69
|
+
[:c_r_1bet, "boolean", :c_r_1bet?],
|
70
|
+
[:c_r_2bet, "boolean", :c_r_2bet?],
|
71
|
+
[:c_r_3bet, "boolean", :c_r_3bet?],
|
72
|
+
[:c_r_4bet, "boolean", :c_r_4bet?],
|
37
73
|
|
38
|
-
[:call_preflop_1bet, "boolean", :call_preflop_1bet],
|
39
|
-
[:call_preflop_2bet, "boolean", :call_preflop_2bet],
|
40
|
-
[:call_preflop_3bet, "boolean", :call_preflop_3bet],
|
41
|
-
[:call_preflop_4bet, "boolean", :call_preflop_4bet],
|
42
|
-
[:call_flop_1bet, "boolean", :call_flop_1bet],
|
43
|
-
[:call_flop_2bet, "boolean", :call_flop_2bet],
|
44
|
-
[:call_flop_3bet, "boolean", :call_flop_3bet],
|
45
|
-
[:call_flop_4bet, "boolean", :call_flop_4bet],
|
46
|
-
[:call_turn_1bet, "boolean", :call_turn_1bet],
|
47
|
-
[:call_turn_2bet, "boolean", :call_turn_2bet],
|
48
|
-
[:call_turn_3bet, "boolean", :call_turn_3bet],
|
49
|
-
[:call_turn_4bet, "boolean", :call_turn_4bet],
|
50
|
-
[:call_river_1bet, "boolean", :call_river_1bet],
|
51
|
-
[:call_river_2bet, "boolean", :call_river_2bet],
|
52
|
-
[:call_river_3bet, "boolean", :call_river_3bet],
|
53
|
-
[:call_river_4bet, "boolean", :call_river_4bet],
|
54
|
-
|
55
74
|
[:last_aggr_preflop, 'boolean', :last_aggr_preflop],
|
56
|
-
[:last_aggr_flop,
|
57
|
-
[:last_aggr_turn,
|
58
|
-
[:last_aggr_river,
|
75
|
+
[:last_aggr_flop, 'boolean', :last_aggr_flop],
|
76
|
+
[:last_aggr_turn, 'boolean', :last_aggr_turn],
|
77
|
+
[:last_aggr_river, 'boolean', :last_aggr_river],
|
59
78
|
|
60
|
-
[:
|
61
|
-
[:
|
62
|
-
[:
|
63
|
-
[:
|
64
|
-
[:
|
65
|
-
[:
|
66
|
-
[:
|
67
|
-
[:
|
68
|
-
[:
|
79
|
+
[:f_cbet, 'boolean', :f_cbet?],
|
80
|
+
[:f_cbet_o, "boolean", :f_cbet_o?],
|
81
|
+
[:t_cbet, 'boolean', :t_cbet?],
|
82
|
+
[:t_cbet_o, "boolean", :t_cbet_o?],
|
83
|
+
[:r_cbet, 'boolean', :r_cbet?],
|
84
|
+
[:r_cbet_o, "boolean", :r_cbet_o?],
|
85
|
+
[:c_f_cbet, 'boolean', :c_f_cbet?],
|
86
|
+
[:c_f_cbet_o, "boolean", :c_f_cbet_o?],
|
87
|
+
[:c_t_cbet, 'boolean', :c_t_cbet?],
|
88
|
+
[:c_t_cbet_o, "boolean", :c_t_cbet_o?],
|
89
|
+
[:c_r_cbet, 'boolean', :c_r_cbet?],
|
90
|
+
[:c_r_cbet_o, "boolean", :c_r_cbet_o?],
|
91
|
+
[:f2_f_cbet, 'boolean', :f2_f_cbet?],
|
92
|
+
[:f2_f_cbet_o, "boolean", :f2_f_cbet_o?],
|
93
|
+
[:f2_t_cbet, 'boolean', :f2_t_cbet?],
|
94
|
+
[:f2_t_cbet_o, "boolean", :f2_t_cbet_o?],
|
95
|
+
[:f2_r_cbet, 'boolean', :f2_r_cbet?],
|
96
|
+
[:f2_r_cbet_o, "boolean", :f2_r_cbet_o?],
|
69
97
|
|
70
|
-
[:
|
71
|
-
[:
|
72
|
-
[:
|
73
|
-
[:
|
74
|
-
[:
|
75
|
-
[:
|
76
|
-
[:
|
77
|
-
[:
|
78
|
-
[:
|
98
|
+
[:f_dbet, 'boolean', :f_dbet?],
|
99
|
+
[:f_dbet_o, "boolean", :f_dbet_o?],
|
100
|
+
[:t_dbet, 'boolean', :t_dbet?],
|
101
|
+
[:t_dbet_o, "boolean", :t_dbet_o?],
|
102
|
+
[:r_dbet, 'boolean', :r_dbet?],
|
103
|
+
[:r_dbet_o, "boolean", :r_dbet_o?],
|
104
|
+
[:c_f_dbet, 'boolean', :c_f_dbet?],
|
105
|
+
[:c_f_dbet_o, "boolean", :c_f_dbet_o?],
|
106
|
+
[:c_t_dbet, 'boolean', :c_t_dbet?],
|
107
|
+
[:c_t_dbet_o, "boolean", :c_t_dbet_o?],
|
108
|
+
[:c_r_dbet, 'boolean', :c_r_dbet?],
|
109
|
+
[:c_r_dbet_o, "boolean", :c_r_dbet_o?],
|
110
|
+
[:f2_f_dbet, 'boolean', :f2_f_dbet?],
|
111
|
+
[:f2_f_dbet_o, "boolean", :f2_f_dbet_o?],
|
112
|
+
[:f2_t_dbet, 'boolean', :f2_t_dbet?],
|
113
|
+
[:f2_t_dbet_o, "boolean", :f2_t_dbet_o?],
|
114
|
+
[:f2_r_dbet, 'boolean', :f2_r_dbet?],
|
115
|
+
[:f2_r_dbet_o, 'boolean', :f2_r_dbet_o?]
|
79
116
|
]
|
80
117
|
end
|
81
118
|
|
82
119
|
attr_accessor :street_bets, :fold_to_street_bets, :last_aggr_player
|
83
|
-
|
84
|
-
#
|
85
|
-
# These functions return one of three, not two values, and hence do not end with a "?".
|
86
|
-
# A nil value indicates that the player had no opportunity to make the described bet.
|
87
|
-
# For example:
|
88
|
-
# cbet_flop(player)
|
89
|
-
# nil -- player did not have an opportunity to make a cbet on the flop
|
90
|
-
# true -- player made a cbet on the flop
|
91
|
-
# false -- player had an opportunity to make a cbet on the flop, but did not
|
92
|
-
#
|
93
|
-
# fold_to_flop_2bet(player)
|
94
|
-
# nil -- player did not have an opportunity to fold to a 2bet on the flop
|
95
|
-
# true -- player folded to a 2bet on the flop
|
96
|
-
# false -- player had an opportunity to fold to a 2bet on the flop, but did not
|
97
|
-
#
|
98
|
-
# Some care must be taken in the code and testing to assure the consistency of the nil/false dichotomy
|
99
|
-
#
|
100
|
-
# They are defined dynamically due to their number and similarities
|
101
|
-
#
|
102
|
-
|
120
|
+
|
103
121
|
for street in [:preflop, :flop, :turn, :river]
|
104
|
-
|
122
|
+
|
123
|
+
street_first = case street
|
124
|
+
when :preflop then :p
|
125
|
+
when :flop then :f
|
126
|
+
when :turn then :t
|
127
|
+
when :river then :r
|
128
|
+
end
|
129
|
+
|
105
130
|
#
|
106
131
|
# last agresssion functions
|
107
132
|
# true only if player made the last aggressive move on the street
|
@@ -115,32 +140,62 @@ module Pokerstats
|
|
115
140
|
LAST_AGGR_FUNCTIONS
|
116
141
|
|
117
142
|
#
|
118
|
-
# make_,
|
143
|
+
# make_, c_, and f2_ functions, by bet and street street
|
119
144
|
#
|
120
|
-
for bet in 1..
|
145
|
+
for bet in 1..5
|
121
146
|
class_eval <<-STREET_AND_BET_FUNCTIONS
|
122
|
-
def #{
|
123
|
-
@street_bets[#{street.inspect}] && @street_bets[#{street.inspect}][#{bet}][player]
|
147
|
+
def #{street_first}_#{bet}bet(player)
|
148
|
+
@street_bets[#{street.inspect}] && @street_bets[#{street.inspect}][#{bet}][player]
|
149
|
+
end
|
150
|
+
def #{street_first}_#{bet}bet?(player)
|
151
|
+
#{street_first}_#{bet}bet(player) || false
|
124
152
|
end
|
125
|
-
def
|
153
|
+
def #{street_first}_#{bet}bet_o?(player)
|
154
|
+
!#{street_first}_#{bet}bet(player).nil?
|
155
|
+
end
|
156
|
+
STREET_AND_BET_FUNCTIONS
|
157
|
+
end
|
158
|
+
|
159
|
+
for bet in 1..4
|
160
|
+
class_eval <<-RESPOND_TO_STREET_AND_BET_FUNCTIONS
|
161
|
+
def c_#{street_first}_#{bet}bet(player)
|
126
162
|
@call_street_bets[#{street.inspect}] && @call_street_bets[#{street.inspect}][#{bet}][player]
|
127
163
|
end
|
128
|
-
def
|
164
|
+
def c_#{street_first}_#{bet}bet?(player)
|
165
|
+
c_#{street_first}_#{bet}bet(player) || false
|
166
|
+
end
|
167
|
+
# def c_#{street_first}_#{bet}bet_o?(player)
|
168
|
+
# !c_#{street_first}_#{bet}bet(player).nil?
|
169
|
+
# end
|
170
|
+
def f2_#{street_first}_#{bet}bet(player)
|
129
171
|
@fold_to_street_bets[#{street.inspect}] && @fold_to_street_bets[#{street.inspect}][#{bet}][player]
|
130
172
|
end
|
131
|
-
|
173
|
+
def f2_#{street_first}_#{bet}bet?(player)
|
174
|
+
f2_#{street_first}_#{bet}bet(player) || false
|
175
|
+
end
|
176
|
+
# def f2_#{street_first}_#{bet}bet_o?(player)
|
177
|
+
# !f2_#{street_first}_#{bet}bet(player).nil?
|
178
|
+
# end
|
179
|
+
RESPOND_TO_STREET_AND_BET_FUNCTIONS
|
132
180
|
end
|
133
181
|
end
|
134
182
|
|
135
183
|
for street in [:flop, :turn, :river]
|
136
184
|
last_street = case street
|
137
|
-
|
138
|
-
|
139
|
-
|
185
|
+
when :flop then :preflop
|
186
|
+
when :turn then :flop
|
187
|
+
when :river then :turn
|
188
|
+
end
|
189
|
+
|
190
|
+
street_first = case street
|
191
|
+
when :preflop then :p
|
192
|
+
when :flop then :f
|
193
|
+
when :turn then :t
|
194
|
+
when :river then :r
|
140
195
|
end
|
141
196
|
|
142
197
|
#
|
143
|
-
# make,
|
198
|
+
# make, c_ and f2_ cbet and dbet functions, by street
|
144
199
|
#
|
145
200
|
# cbets (continuation bets) are first-in bets after making last agression on the previous street
|
146
201
|
#
|
@@ -148,26 +203,62 @@ module Pokerstats
|
|
148
203
|
#
|
149
204
|
|
150
205
|
class_eval <<-FTR_FUNCTIONS
|
151
|
-
def
|
152
|
-
last_aggr_#{last_street}(player) && #{
|
206
|
+
def #{street_first}_cbet(player)
|
207
|
+
last_aggr_#{last_street}(player) && #{street_first}_1bet(player)
|
208
|
+
end
|
209
|
+
def #{street_first}_cbet?(player)
|
210
|
+
#{street_first}_cbet(player) || false
|
211
|
+
end
|
212
|
+
def #{street_first}_cbet_o?(player)
|
213
|
+
!#{street_first}_cbet(player).nil?
|
214
|
+
end
|
215
|
+
def f2_#{street_first}_cbet(player)
|
216
|
+
@first_aggr_player[:#{street}] && #{street_first}_cbet(@first_aggr_player[:#{street}]) && f2_#{street_first}_1bet(player)
|
217
|
+
end
|
218
|
+
def f2_#{street_first}_cbet?(player)
|
219
|
+
f2_#{street_first}_cbet(player) || false
|
220
|
+
end
|
221
|
+
def f2_#{street_first}_cbet_o?(player)
|
222
|
+
!f2_#{street_first}_cbet(player).nil?
|
153
223
|
end
|
154
|
-
def
|
155
|
-
@first_aggr_player[:#{street}] &&
|
224
|
+
def c_#{street_first}_cbet(player)
|
225
|
+
@first_aggr_player[:#{street}] && #{street_first}_cbet(@first_aggr_player[:#{street}]) && c_#{street_first}_1bet(player)
|
156
226
|
end
|
157
|
-
def
|
158
|
-
|
227
|
+
def c_#{street_first}_cbet?(player)
|
228
|
+
c_#{street_first}_cbet(player) || false
|
159
229
|
end
|
160
|
-
def
|
230
|
+
def c_#{street_first}_cbet_o?(player)
|
231
|
+
!c_#{street_first}_cbet(player).nil?
|
232
|
+
end
|
233
|
+
def #{street_first}_dbet(player)
|
161
234
|
return nil unless @last_aggr_player[:#{last_street}] && @hand_statistics.betting_order?(player, @last_aggr_player[:#{last_street}])
|
162
|
-
#{
|
235
|
+
#{street_first}_1bet(player)
|
236
|
+
end
|
237
|
+
def #{street_first}_dbet?(player)
|
238
|
+
#{street_first}_dbet(player) || false
|
239
|
+
end
|
240
|
+
def #{street_first}_dbet_o?(player)
|
241
|
+
!#{street_first}_dbet(player).nil?
|
242
|
+
end
|
243
|
+
def f2_#{street_first}_dbet(player)
|
244
|
+
return nil unless @first_aggr_player[:#{street}] && #{street_first}_dbet(@first_aggr_player[:#{street}])
|
245
|
+
f2_#{street_first}_1bet(player)
|
163
246
|
end
|
164
|
-
def
|
165
|
-
|
166
|
-
fold_to_#{street}_1bet(player)
|
247
|
+
def f2_#{street_first}_dbet?(player)
|
248
|
+
f2_#{street_first}_dbet(player) || false
|
167
249
|
end
|
168
|
-
def
|
169
|
-
|
170
|
-
|
250
|
+
def f2_#{street_first}_dbet_o?(player)
|
251
|
+
!f2_#{street_first}_dbet(player).nil?
|
252
|
+
end
|
253
|
+
def c_#{street_first}_dbet(player)
|
254
|
+
return nil unless @first_aggr_player[:#{street}] && #{street_first}_dbet(@first_aggr_player[:#{street}])
|
255
|
+
c_#{street_first}_1bet(player)
|
256
|
+
end
|
257
|
+
def c_#{street_first}_dbet?(player)
|
258
|
+
c_#{street_first}_dbet(player) || false
|
259
|
+
end
|
260
|
+
def c_#{street_first}_dbet_o?(player)
|
261
|
+
!c_#{street_first}_dbet(player).nil?
|
171
262
|
end
|
172
263
|
FTR_FUNCTIONS
|
173
264
|
end
|
@@ -179,7 +270,7 @@ module Pokerstats
|
|
179
270
|
@first_aggr_player = {}
|
180
271
|
@last_aggr_player = {}
|
181
272
|
[:preflop, :flop, :turn, :river].each do|each|
|
182
|
-
@street_bets[each] = [{}, {}, {}, {}, {}]
|
273
|
+
@street_bets[each] = [{}, {}, {}, {}, {}, {}]
|
183
274
|
@call_street_bets[each] = [{}, {}, {}, {}, {}]
|
184
275
|
@fold_to_street_bets[each] = [{}, {}, {}, {}, {}]
|
185
276
|
end
|
@@ -210,7 +301,7 @@ module Pokerstats
|
|
210
301
|
@fold_to_street_bets[street][@last_bet][action[:screen_name]] = action[:description] == "folds"
|
211
302
|
@call_street_bets[street][@last_bet][action[:screen_name]] = action[:description] == "calls"
|
212
303
|
end
|
213
|
-
if @last_bet.between?(0,
|
304
|
+
if @last_bet.between?(0,4)
|
214
305
|
@street_bets[street][@last_bet+1][action[:screen_name]] = action[:aggression] == :aggressive
|
215
306
|
end
|
216
307
|
if action[:aggression] == :aggressive
|