From 7d48f0223f817703b94056a716fd8ba03b464127 Mon Sep 17 00:00:00 2001 From: Worros Date: Wed, 23 Feb 2011 12:30:48 +0800 Subject: [PATCH] Winamax: Adjust readCollectPot Remove guard for returning money. Unsure if this is correct. Passes the regression test suite, so committing for user test --- pyfpdb/WinamaxToFpdb.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/pyfpdb/WinamaxToFpdb.py b/pyfpdb/WinamaxToFpdb.py index 9d4721ec..6aa6f51c 100644 --- a/pyfpdb/WinamaxToFpdb.py +++ b/pyfpdb/WinamaxToFpdb.py @@ -430,10 +430,6 @@ class Winamax(HandHistoryConverter): # Return any uncalled bet. committed = sorted([ (v,k) for (k,v) in hand.pot.committed.items()]) #print "DEBUG: committed: %s" % committed - #ERROR below. lastbet is correct in most cases, but wrong when - # additional money is committed to the pot in cash games - # due to an additional sb being posted. (Speculate that - # posting sb+bb is also potentially wrong) returned = {} lastbet = committed[-1][0] - committed[-2][0] if lastbet > 0: # uncalled @@ -451,10 +447,11 @@ class Winamax(HandHistoryConverter): for m in self.re_CollectPot.finditer(hand.handText): collectees.append([m.group('PNAME'), m.group('POT')]) + #print "DEBUG: Total pot: %s" % tp.groupdict() + #print "DEBUG: According to pot: %s" % total + #print "DEBUG: Rake: %s" % rake + if len(collectees) == 1: - #print "DEBUG: Total pot: %s" % tp.groupdict() - #print "DEBUG: According to pot: %s" % total - #print "DEBUG: Rake: %s" % rake plyr, p = collectees[0] # p may be wrong, use calculated total - rake p = total - Decimal(rake) @@ -462,7 +459,7 @@ class Winamax(HandHistoryConverter): hand.addCollectPot(player=plyr,pot=p) else: for plyr, p in collectees: - if plyr in returned.keys() and Decimal(p) - returned[plyr] == 0: + if plyr in returned.keys(): p = Decimal(p) - returned[plyr] if p > 0: #print "DEBUG: addCollectPot(%s,%s)" %(plyr, p)