Added new stat: fold to steal

Added new stat: fold to steal

Signed-off-by: steffen123 <steffen@schaumburger.info>
This commit is contained in:
Ferenc Erki 2010-07-17 00:15:27 +02:00 committed by steffen123
parent f74d5b14ca
commit d241ce9b48

View File

@ -350,6 +350,29 @@ def f_BB_steal(stat_dict, player):
'fBB_s=NA', 'fBB_s=NA',
'(0/0)', '(0/0)',
'% folded BB to steal') '% folded BB to steal')
def f_steal(stat_dict, player):
""" Folded blind to steal."""
stat = 0.0
try:
folded_blind = stat_dict[player]['sbnotdef'] + stat_dict[player]['bbnotdef']
blind_stolen = stat_dict[player]['sbstolen'] + stat_dict[player]['bbstolen']
stat = float(folded_blind)/float(blind_stolen)
return (stat,
'%3.1f' % (100*stat) + '%',
'fB=%3.1f' % (100*stat) + '%',
'fB_s=%3.1f' % (100*stat) + '%',
'(%d/%d)' % (folded_blind, blind_stolen),
'% folded blind to steal'
)
except:
return (stat,
'NA',
'fB=NA',
'fB_s=NA',
'(0/0)',
'% folded blind to steal')
def three_B(stat_dict, player): def three_B(stat_dict, player):
""" Three bet preflop/3rd.""" """ Three bet preflop/3rd."""
@ -777,6 +800,7 @@ if __name__== "__main__":
#print "player = ", player, do_stat(stat_dict, player = player, stat = 'steal') #print "player = ", player, do_stat(stat_dict, player = player, stat = 'steal')
#print "player = ", player, do_stat(stat_dict, player = player, stat = 'f_SB_steal') #print "player = ", player, do_stat(stat_dict, player = player, stat = 'f_SB_steal')
#print "player = ", player, do_stat(stat_dict, player = player, stat = 'f_BB_steal') #print "player = ", player, do_stat(stat_dict, player = player, stat = 'f_BB_steal')
#print "player = ", player, do_stat(stat_dict, player = player, stat = 'f_steal')
#print "player = ", player, do_stat(stat_dict, player = player, stat = 'three_B') #print "player = ", player, do_stat(stat_dict, player = player, stat = 'three_B')
#print "player = ", player, do_stat(stat_dict, player = player, stat = 'WMsF') #print "player = ", player, do_stat(stat_dict, player = player, stat = 'WMsF')
#print "player = ", player, do_stat(stat_dict, player = player, stat = 'a_freq1') #print "player = ", player, do_stat(stat_dict, player = player, stat = 'a_freq1')