Merge branch 'master' of git://git.assembla.com/fpdboz.git

This commit is contained in:
Gerko de Roo 2010-02-18 21:47:14 +01:00
commit 0294e4fdbb
2 changed files with 16 additions and 8 deletions

View File

@ -349,6 +349,11 @@ For sites (currently only Carbon Poker) which record "all in" as a special actio
self.pot.addCommonMoney(player, amount) self.pot.addCommonMoney(player, amount)
amount += amount amount += amount
if blindtype == 'secondsb':
amount = Decimal(0)
self.bets['BLINDSANTES'][player].append(Decimal(self.sb))
self.pot.addCommonMoney(Decimal(self.sb))
self.bets['PREFLOP'][player].append(Decimal(amount)) self.bets['PREFLOP'][player].append(Decimal(amount))
self.pot.addMoney(player, Decimal(amount)) self.pot.addMoney(player, Decimal(amount))
self.lastBet['PREFLOP'] = Decimal(amount) self.lastBet['PREFLOP'] = Decimal(amount)
@ -1445,6 +1450,7 @@ class Pot(object):
# Return any uncalled bet. # Return any uncalled bet.
committed = sorted([ (v,k) for (k,v) in self.committed.items()]) committed = sorted([ (v,k) for (k,v) in self.committed.items()])
print "DEBUG: committed: %s" % committed
#ERROR below. lastbet is correct in most cases, but wrong when #ERROR below. lastbet is correct in most cases, but wrong when
# additional money is committed to the pot in cash games # additional money is committed to the pot in cash games
# due to an additional sb being posted. (Speculate that # due to an additional sb being posted. (Speculate that

View File

@ -287,14 +287,16 @@ class PokerStars(HandHistoryConverter):
hand.addBringIn(m.group('PNAME'), m.group('BRINGIN')) hand.addBringIn(m.group('PNAME'), m.group('BRINGIN'))
def readBlinds(self, hand): def readBlinds(self, hand):
liveBlind = True try:
for a in self.re_PostSB.finditer(hand.handText): count = 0
if liveBlind: for a in self.re_PostSB.finditer(hand.handText):
hand.addBlind(a.group('PNAME'), 'small blind', a.group('SB')) if count == 0:
liveBlind = False hand.addBlind(a.group('PNAME'), 'small blind', a.group('SB'))
else: count = 1
# Post dead blinds as ante else:
hand.addAnte(a.group('PNAME'), a.group('SB')) hand.addBlind(a.group('PNAME'), 'secondsb', a.group('SB'))
except: # no small blind
hand.addBlind(None, None, None)
for a in self.re_PostBB.finditer(hand.handText): for a in self.re_PostBB.finditer(hand.handText):
hand.addBlind(a.group('PNAME'), 'big blind', a.group('BB')) hand.addBlind(a.group('PNAME'), 'big blind', a.group('BB'))
for a in self.re_PostBoth.finditer(hand.handText): for a in self.re_PostBoth.finditer(hand.handText):