add steal stat to playerstats

This commit is contained in:
sqlcoder 2009-05-02 21:32:47 +01:00
parent 882f19a34d
commit 79b3dba2dd
2 changed files with 10 additions and 2 deletions

View File

@ -641,6 +641,7 @@ class FpdbSQLQueries:
,stats.n
,stats.vpip
,stats.pfr
,stats.steals
,stats.saw_f
,stats.sawsd
,stats.wtsdwsf
@ -671,6 +672,9 @@ class FpdbSQLQueries:
,sum(HDs) AS n
,format(100.0*sum(street0VPI)/sum(HDs),1) AS vpip
,format(100.0*sum(street0Aggr)/sum(HDs),1) AS pfr
,case when sum(stealattemptchance) = 0 then '0'
else format(100.0*sum(stealattempted)/sum(stealattemptchance),1)
end AS steals
,format(100.0*sum(street1Seen)/sum(HDs),1) AS saw_f
,format(100.0*sum(sawShowdown)/sum(HDs),1) AS sawsd
,case when sum(street1Seen) = 0 then 'oo'
@ -740,6 +744,7 @@ class FpdbSQLQueries:
,stats.n
,stats.vpip
,stats.pfr
,stats.steals
,stats.saw_f
,stats.sawsd
,stats.wtsdwsf
@ -769,6 +774,9 @@ class FpdbSQLQueries:
,sum(HDs) as n
,to_char(100.0*sum(street0VPI)/sum(HDs),'90D0') AS vpip
,to_char(100.0*sum(street0Aggr)/sum(HDs),'90D0') AS pfr
,case when sum(stealattemptchance) = 0 then '0'
else to_char(100.0*sum(stealattempted)/sum(stealattemptchance),'90D0')
end AS steals
,to_char(100.0*sum(street1Seen)/sum(HDs),'90D0') AS saw_f
,to_char(100.0*sum(sawShowdown)/sum(HDs),'90D0') AS sawsd
,case when sum(street1Seen) = 0 then 'oo'

View File

@ -118,7 +118,7 @@ class GuiPlayerStats (threading.Thread):
self.cursor.execute(tmp)
result = self.cursor.fetchall()
cols = 16
cols = 17
rows = len(result)+1 # +1 for title row
self.stats_table = gtk.Table(rows, cols, False)
self.stats_table.set_col_spacings(4)
@ -126,7 +126,7 @@ class GuiPlayerStats (threading.Thread):
vbox.add(self.stats_table)
# Create header row
titles = ("Game", "Hands", "VPIP", "PFR", "Saw_F", "SawSD", "WtSDwsF", "W$SD", "FlAFq", "TuAFq", "RvAFq", "PoFAFq", "Net($)", "BB/100", "$/hand", "Variance")
titles = ("Game", "Hands", "VPIP", "PFR", "Steals", "Saw_F", "SawSD", "WtSDwsF", "W$SD", "FlAFq", "TuAFq", "RvAFq", "PoFAFq", "Net($)", "BB/100", "$/hand", "Variance")
col = 0
row = 0