From 5bf7d9038a39a6d9295749cfabdc30a525875158 Mon Sep 17 00:00:00 2001 From: Ray Date: Sat, 28 Feb 2009 15:19:01 -0500 Subject: [PATCH 1/4] Fix bug in autoclosing HUDs on windows. --- pyfpdb/Hud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/Hud.py b/pyfpdb/Hud.py index 73dd3472..d821e41e 100644 --- a/pyfpdb/Hud.py +++ b/pyfpdb/Hud.py @@ -142,7 +142,7 @@ class Hud: def update_table_position(self): if os.name == 'nt': if not win32gui.IsWindow(self.table.number): - self.kill_hud() + self.parent.kill_hud(self) return False # anyone know how to do this in unix, or better yet, trap the X11 error that is triggered when executing the get_origin() for a closed window? From 5ba8d3b95d647d073857f26b5019a5c3379e5676 Mon Sep 17 00:00:00 2001 From: Ray Date: Sat, 28 Feb 2009 18:46:54 -0500 Subject: [PATCH 2/4] Fix missing argument in call to kill_hud. --- pyfpdb/Hud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/Hud.py b/pyfpdb/Hud.py index d821e41e..ed43bea2 100644 --- a/pyfpdb/Hud.py +++ b/pyfpdb/Hud.py @@ -142,7 +142,7 @@ class Hud: def update_table_position(self): if os.name == 'nt': if not win32gui.IsWindow(self.table.number): - self.parent.kill_hud(self) + self.parent.kill_hud(self, self.table.name) return False # anyone know how to do this in unix, or better yet, trap the X11 error that is triggered when executing the get_origin() for a closed window? From 3cf8239cc906cd3f56c77518c756cd2240b36219 Mon Sep 17 00:00:00 2001 From: Worros Date: Sun, 1 Mar 2009 23:05:21 +0900 Subject: [PATCH 3/4] Fix bug inmporting Everleaf PLO --- pyfpdb/EverleafToFpdb.py | 4 ++-- pyfpdb/Hand.py | 4 ++-- pyfpdb/HandHistoryConverter.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index 79c1f7d6..1f8ecbeb 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -62,7 +62,7 @@ class Everleaf(HandHistoryConverter): def readSupportedGames(self): return [["ring", "hold", "nl"], ["ring", "hold", "pl"], - ["ring", "omaha", "pl"] + ["ring", "omahahi", "pl"] ] def determineGameType(self): @@ -221,7 +221,7 @@ class Everleaf(HandHistoryConverter): if __name__ == "__main__": c = Configuration.Config() if len(sys.argv) == 1: - testfile = "regression-test-files/everleaf/Speed_Kuala_full.txt" + testfile = "regression-test-files/everleaf/plo/Naos.txt" else: testfile = sys.argv[1] e = Everleaf(c, testfile) diff --git a/pyfpdb/Hand.py b/pyfpdb/Hand.py index 80591a5f..a1c43ead 100644 --- a/pyfpdb/Hand.py +++ b/pyfpdb/Hand.py @@ -39,7 +39,7 @@ class Hand: self.gametype = gametype self.string = string - if gametype[1] == "hold" or self.gametype[1] == "omaha": + if gametype[1] == "hold" or self.gametype[1] == "omahahi": self.streetList = ['PREFLOP','FLOP','TURN','RIVER'] # a list of the observed street names in order elif self.gametype[1] == "razz" or self.gametype[1] == "stud" or self.gametype[1] == "stud8": self.streetList = ['ANTES','THIRD','FOURTH','FIFTH','SIXTH','SEVENTH'] # a list of the observed street names in order @@ -403,7 +403,7 @@ Map the tuple self.gametype onto the pokerstars string describing it return string def writeHand(self, fh=sys.__stdout__): - if self.gametype[1] == "hold" or self.gametype[1] == "omaha": + if self.gametype[1] == "hold" or self.gametype[1] == "omahahi": self.writeHoldemHand(fh) else: self.writeStudHand(fh) diff --git a/pyfpdb/HandHistoryConverter.py b/pyfpdb/HandHistoryConverter.py index 93e0beb6..3ed2f4c9 100644 --- a/pyfpdb/HandHistoryConverter.py +++ b/pyfpdb/HandHistoryConverter.py @@ -141,7 +141,7 @@ class HandHistoryConverter: self.markStreets(hand) # Different calls if stud or holdem like - if self.gametype[1] == "hold" or self.gametype[1] == "omaha": + if self.gametype[1] == "hold" or self.gametype[1] == "omahahi": self.readBlinds(hand) self.readButton(hand) self.readHeroCards(hand) # want to generalise to draw games @@ -155,7 +155,7 @@ class HandHistoryConverter: for street in hand.streetList: # go through them in order print "DEBUG: ", street if hand.streets.group(street) is not None: - if self.gametype[1] == "hold" or self.gametype[1] == "omaha": + if self.gametype[1] == "hold" or self.gametype[1] == "omahahi": self.readCommunityCards(hand, street) # read community cards elif self.gametype[1] == "razz" or self.gametype[1] == "stud" or self.gametype[1] == "stud8": self.readPlayerCards(hand, street) From d4cc5d418251f803c3b1acf574274a32829d9545 Mon Sep 17 00:00:00 2001 From: Worros Date: Mon, 2 Mar 2009 01:52:52 +0900 Subject: [PATCH 4/4] Initial fix for Everlead limit games Only one entry in the lookup table at the moment, need to collect data and expand for all known limits --- pyfpdb/Hand.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/pyfpdb/Hand.py b/pyfpdb/Hand.py index a1c43ead..dff8de9d 100644 --- a/pyfpdb/Hand.py +++ b/pyfpdb/Hand.py @@ -402,6 +402,15 @@ Map the tuple self.gametype onto the pokerstars string describing it return string + def lookupLimitBetSize(self): + #Lookup table for limit games + everleaf = { "0.10" : ("0.02", "0.05") + } + + if self.sitename == "Everleaf": + return everleaf[self.bb] + + def writeHand(self, fh=sys.__stdout__): if self.gametype[1] == "hold" or self.gametype[1] == "omahahi": self.writeHoldemHand(fh) @@ -424,13 +433,19 @@ Map the tuple self.gametype onto the pokerstars string describing it #May be more than 1 bb posting + if self.gametype[2] == "fl": + (smallbet, bigbet) = self.lookupLimitBetSize() + else: + smallbet = self.sb + bigbet = self.bb + for a in self.posted: if(a[1] == "small blind"): - print >>fh, _("%s: posts small blind $%s" %(a[0], self.sb)) + print >>fh, _("%s: posts small blind $%s" %(a[0], smallbet)) if(a[1] == "big blind"): - print >>fh, _("%s: posts big blind $%s" %(a[0], self.bb)) + print >>fh, _("%s: posts big blind $%s" %(a[0], bigbet)) if(a[1] == "both"): - print >>fh, _("%s: posts small & big blinds $%.2f" %(a[0], (Decimal(self.sb) + Decimal(self.bb)))) + print >>fh, _("%s: posts small & big blinds $%.2f" %(a[0], (Decimal(smallbet) + Decimal(bigbet)))) print >>fh, _("*** HOLE CARDS ***") if self.involved: