From 6d61e1e6c6d79ad1d5e1e1a3fd917eb17ad82eef Mon Sep 17 00:00:00 2001 From: steffen123 Date: Wed, 13 Aug 2008 03:29:24 +0100 Subject: [PATCH] git29 - it displays ST correctly (well, for the one steal I checked that is) --- pyfpdb/fpdb.py | 2 +- pyfpdb/fpdb_simple.py | 12 ++++++------ pyfpdb/table_viewer.py | 6 ++++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/pyfpdb/fpdb.py b/pyfpdb/fpdb.py index d194ad88..b54550ea 100755 --- a/pyfpdb/fpdb.py +++ b/pyfpdb/fpdb.py @@ -347,7 +347,7 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt") self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.connect("delete_event", self.delete_event) self.window.connect("destroy", self.destroy) - self.window.set_title("Free Poker DB - version: alpha1+, git28") + self.window.set_title("Free Poker DB - version: alpha1+, git29") self.window.set_border_width(1) self.window.set_size_request(950,400) self.window.set_resizable(True) diff --git a/pyfpdb/fpdb_simple.py b/pyfpdb/fpdb_simple.py index 2aca4a82..bd89b872 100644 --- a/pyfpdb/fpdb_simple.py +++ b/pyfpdb/fpdb_simple.py @@ -1330,16 +1330,16 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings #PF3B4BChance and PF3B4B pfFold=-1 pfRaise=-1 - if firstPfRaise!=-1: + if firstPfRaiseByNo!=-1: for i in range(len(actionTypeByNo[0])): if actionTypeByNo[0][i][0]==player_ids[player]: - if actionTypeByNo[0][i][1]=="bet" and pfRaise==-1 and i>firstPfRaise: + if actionTypeByNo[0][i][1]=="bet" and pfRaise==-1 and i>firstPfRaiseByNo: pfRaise=i if actionTypeByNo[0][i][1]=="fold" and pfFold==-1: pfFold=i - if pfFold==-1 or pfFold>firstPfRaise: + if pfFold==-1 or pfFold>firstPfRaiseByNo: myPF3B4BChance=True - if pfRaise>firstPfRaise: + if pfRaise>firstPfRaiseByNo: myPF3B4B=True #myStealAttemptChance myStealAttempted myFoldBbToStealChance myFoldedBbToSteal myFoldSbToStealChance myFoldedSbToSteal @@ -1357,13 +1357,13 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings myStealAttempted=True elif firstPfRaiserId==sbId or firstPfRaiserId==bbId or firstPfRaiserId==-1: myStealAttemptChance=True - if positions[player]==S: + if positions[player]=='S': if firstPfRaiserId==player_ids[player]: myStealAttemptChance=True myStealAttempted=True elif firstPfRaiserId==bbId or firstPfRaiserId==-1: myStealAttemptChance=True - if positions[player]==B: + if positions[player]=='B': pass diff --git a/pyfpdb/table_viewer.py b/pyfpdb/table_viewer.py index c8d01b87..9c0b9af8 100755 --- a/pyfpdb/table_viewer.py +++ b/pyfpdb/table_viewer.py @@ -59,9 +59,9 @@ class table_viewer (threading.Thread): arr=[] #first prepare the header row if (self.category=="holdem" or self.category=="omahahi" or self.category=="omahahilo"): - tmp=("Name", "Hands", "VPIP", "PFR", "PF3B4B", "AF", "FF", "AT", "FT", "AR", "FR", "SD/F", "W$wsF", "W$@SD") + tmp=("Name", "Hands", "VPIP", "PFR", "PF3B4B", "ST", "AF", "FF", "AT", "FT", "AR", "FR", "SD/F", "W$wsF", "W$@SD") if self.settings['tv-combinedPostflop']: - tmp=("Name", "Hands", "VPIP", "PFR", "PF3B4B", "Postf A", "Postf F", "SD/F", "W$wsF", "W$@SD") + tmp=("Name", "Hands", "VPIP", "PFR", "PF3B4B", "ST", "Postf A", "Postf F", "SD/F", "W$wsF", "W$@SD") else: raise fpdb_simple.FpdbError("reimplement stud") tmp=("Name", "Hands", "VPI3", "A3", "3B4B_3" "A4", "F4", "A5", "F5", "A6", "F6", "A7", "F7", "SD/4") @@ -107,6 +107,8 @@ class table_viewer (threading.Thread): tmp.append(self.hudDivide(row[5],row[4])) #VPIP tmp.append(self.hudDivide(row[6],row[4])) #PFR tmp.append(self.hudDivide(row[8],row[7])+" ("+str(row[7])+")") #PF3B4B + tmp.append(self.hudDivide(row[25],row[24])+" ("+str(row[24])+")") #ST + if self.settings['tv-combinedPostflop']: aggCount=row[13]+row[14]+row[15] handCount=row[9]+row[10]+row[11]