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:
parent
4b658b2e4e
commit
7d48f0223f
|
@ -430,10 +430,6 @@ class Winamax(HandHistoryConverter):
|
||||||
# Return any uncalled bet.
|
# Return any uncalled bet.
|
||||||
committed = sorted([ (v,k) for (k,v) in hand.pot.committed.items()])
|
committed = sorted([ (v,k) for (k,v) in hand.pot.committed.items()])
|
||||||
#print "DEBUG: committed: %s" % committed
|
#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 = {}
|
returned = {}
|
||||||
lastbet = committed[-1][0] - committed[-2][0]
|
lastbet = committed[-1][0] - committed[-2][0]
|
||||||
if lastbet > 0: # uncalled
|
if lastbet > 0: # uncalled
|
||||||
|
@ -451,10 +447,11 @@ class Winamax(HandHistoryConverter):
|
||||||
for m in self.re_CollectPot.finditer(hand.handText):
|
for m in self.re_CollectPot.finditer(hand.handText):
|
||||||
collectees.append([m.group('PNAME'), m.group('POT')])
|
collectees.append([m.group('PNAME'), m.group('POT')])
|
||||||
|
|
||||||
if len(collectees) == 1:
|
|
||||||
#print "DEBUG: Total pot: %s" % tp.groupdict()
|
#print "DEBUG: Total pot: %s" % tp.groupdict()
|
||||||
#print "DEBUG: According to pot: %s" % total
|
#print "DEBUG: According to pot: %s" % total
|
||||||
#print "DEBUG: Rake: %s" % rake
|
#print "DEBUG: Rake: %s" % rake
|
||||||
|
|
||||||
|
if len(collectees) == 1:
|
||||||
plyr, p = collectees[0]
|
plyr, p = collectees[0]
|
||||||
# p may be wrong, use calculated total - rake
|
# p may be wrong, use calculated total - rake
|
||||||
p = total - Decimal(rake)
|
p = total - Decimal(rake)
|
||||||
|
@ -462,7 +459,7 @@ class Winamax(HandHistoryConverter):
|
||||||
hand.addCollectPot(player=plyr,pot=p)
|
hand.addCollectPot(player=plyr,pot=p)
|
||||||
else:
|
else:
|
||||||
for plyr, p in collectees:
|
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]
|
p = Decimal(p) - returned[plyr]
|
||||||
if p > 0:
|
if p > 0:
|
||||||
#print "DEBUG: addCollectPot(%s,%s)" %(plyr, p)
|
#print "DEBUG: addCollectPot(%s,%s)" %(plyr, p)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user