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..dff8de9d 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 @@ -402,8 +402,17 @@ 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] == "omaha": + if self.gametype[1] == "hold" or self.gametype[1] == "omahahi": self.writeHoldemHand(fh) else: self.writeStudHand(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: 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) diff --git a/pyfpdb/Hud.py b/pyfpdb/Hud.py index 73dd3472..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.kill_hud() + 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?