PKR: Fix re_CollectPot

This commit is contained in:
Worros 2010-09-03 19:27:17 +08:00
parent f1adfde26c
commit 7731e830f7

View File

@ -116,7 +116,7 @@ class Pkr(HandHistoryConverter):
(\s(%(CUR)s)?(?P<BET>[.\d]+))?
""" % subst, re.MULTILINE|re.VERBOSE)
self.re_ShowdownAction = re.compile(r"^%s: shows \[(?P<CARDS>.*)\]" % player_re, re.MULTILINE)
self.re_CollectPot = re.compile(r"Seat (?P<SEAT>[0-9]+): %(PLYR)s (\(button\) |\(small blind\) |\(big blind\) |\(button\) \(small blind\) )?(collected|showed \[.*\] and won) \(%(CUR)s(?P<POT>[.\d]+)\)(, mucked| with.*|)" % subst, re.MULTILINE)
self.re_CollectPot = re.compile(r"^%(PLYR)s wins %(CUR)s(?P<POT>[.\d]+)" % subst, re.MULTILINE)
self.re_sitsOut = re.compile("^%s sits out" % player_re, re.MULTILINE)
self.re_ShownCards = re.compile("^Seat (?P<SEAT>[0-9]+): %s (\(.*\) )?(?P<SHOWED>showed|mucked) \[(?P<CARDS>.*)\].*" % player_re, re.MULTILINE)
@ -361,6 +361,7 @@ class Pkr(HandHistoryConverter):
def readCollectPot(self,hand):
for m in self.re_CollectPot.finditer(hand.handText):
#print "DEBUG: addCollectPot(%s, %s)" %(m.group('PNAME'), m.group('POT'))
hand.addCollectPot(player=m.group('PNAME'),pot=m.group('POT'))
def readShownCards(self,hand):