Winamax: Adjust readCollectPot

Remove guard for returning money. Unsure if this is correct.

Passes the regression test suite, so committing for user test
This commit is contained in:
Worros 2011-02-23 12:30:48 +08:00
parent 4b658b2e4e
commit 7d48f0223f

View File

@ -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)