From fb6af1fe75b694995001770eefdaf51412e06d50 Mon Sep 17 00:00:00 2001 From: Worros Date: Tue, 30 Mar 2010 13:04:39 +0800 Subject: [PATCH 1/3] Fix for PT-Stud exported Stars HH's Exports files as 'RAZZ LIMIT' instead of 'Razz Limit' --- pyfpdb/PokerStarsToFpdb.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pyfpdb/PokerStarsToFpdb.py b/pyfpdb/PokerStarsToFpdb.py index bf0e8427..801f17d6 100644 --- a/pyfpdb/PokerStarsToFpdb.py +++ b/pyfpdb/PokerStarsToFpdb.py @@ -50,8 +50,8 @@ class PokerStars(HandHistoryConverter): (?P([%(LS)s\+\d\.]+\s?(?P%(LEGAL_ISO)s)?)|Freeroll)\s+)? # close paren of tournament info (?PHORSE|8\-Game|HOSE)?\s?\(? - (?PHold\'em|Razz|7\sCard\sStud|7\sCard\sStud\sHi/Lo|Omaha|Omaha\sHi/Lo|Badugi|Triple\sDraw\s2\-7\sLowball|5\sCard\sDraw)\s - (?PNo\sLimit|Limit|Pot\sLimit)\)?,?\s + (?PHold\'em|Razz|RAZZ|7\sCard\sStud|7\sCard\sStud\sHi/Lo|Omaha|Omaha\sHi/Lo|Badugi|Triple\sDraw\s2\-7\sLowball|5\sCard\sDraw)\s + (?PNo\sLimit|Limit|LIMIT|Pot\sLimit)\)?,?\s (-\sLevel\s(?P[IVXLC]+)\s)? \(? # open paren of the stakes (?P%(LS)s|)? @@ -148,12 +148,13 @@ class PokerStars(HandHistoryConverter): '1000.00': ('250.00', '500.00')} - limits = { 'No Limit':'nl', 'Pot Limit':'pl', 'Limit':'fl' } + limits = { 'No Limit':'nl', 'Pot Limit':'pl', 'Limit':'fl', 'LIMIT':'fl' } games = { # base, category "Hold'em" : ('hold','holdem'), 'Omaha' : ('hold','omahahi'), 'Omaha Hi/Lo' : ('hold','omahahilo'), 'Razz' : ('stud','razz'), + 'RAZZ' : ('stud','razz'), '7 Card Stud' : ('stud','studhi'), '7 Card Stud Hi/Lo' : ('stud','studhilo'), 'Badugi' : ('draw','badugi'), From 81c731b42ed54de9a665adfbcedfd979a39d085a Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 15 Apr 2010 14:51:20 +0800 Subject: [PATCH 2/3] Fix for CBet stat Patch from bbtgaf@googlemail.com aka gimick DerivedStats.betStreet() was only functioning if the player was the first person to act on a street. If the player was checked to the function would exit as False before ever finding the player --- pyfpdb/DerivedStats.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pyfpdb/DerivedStats.py b/pyfpdb/DerivedStats.py index 327b8de2..ae581ee1 100644 --- a/pyfpdb/DerivedStats.py +++ b/pyfpdb/DerivedStats.py @@ -505,9 +505,13 @@ class DerivedStats(): """Returns true if player bet/raised the street as their first action""" betOrRaise = False for act in self.hand.actions[street]: - if act[0] == player and act[1] in ('bets', 'raises'): - betOrRaise = True - else: + if act[0] == player: + if act[1] in ('bets', 'raises'): + betOrRaise = True + else: + # player found but did not bet or raise as their first action break + #else: + # haven't found player's first action yet return betOrRaise From b14bed4e9b5a8cd9e0cb408d4e83d9d2caac2a4c Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 15 Apr 2010 15:48:57 +0800 Subject: [PATCH 3/3] Fix last patch - add pass --- pyfpdb/DerivedStats.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyfpdb/DerivedStats.py b/pyfpdb/DerivedStats.py index ae581ee1..4e55cdfc 100644 --- a/pyfpdb/DerivedStats.py +++ b/pyfpdb/DerivedStats.py @@ -510,6 +510,7 @@ class DerivedStats(): betOrRaise = True else: # player found but did not bet or raise as their first action + pass break #else: # haven't found player's first action yet