From d4cc5d418251f803c3b1acf574274a32829d9545 Mon Sep 17 00:00:00 2001 From: Worros Date: Mon, 2 Mar 2009 01:52:52 +0900 Subject: [PATCH] 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: