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

This commit is contained in:
Ray 2009-02-26 12:02:14 -05:00
commit 55d61fd1a5

View File

@ -177,7 +177,7 @@ class Everleaf(HandHistoryConverter):
# "2c, qh" -> set(["2c","qc"]) # "2c, qh" -> set(["2c","qc"])
# Also works with Omaha hands. # Also works with Omaha hands.
cards = m.group('CARDS') cards = m.group('CARDS')
cards = set(cards.split(', ')) cards = cards.split(', ')
hand.addHoleCards(cards, m.group('PNAME')) hand.addHoleCards(cards, m.group('PNAME'))
def readAction(self, hand, street): def readAction(self, hand, street):
@ -198,9 +198,10 @@ class Everleaf(HandHistoryConverter):
def readShowdownActions(self, hand): def readShowdownActions(self, hand):
"""Reads lines where holecards are reported in a showdown"""
for shows in self.re_ShowdownAction.finditer(hand.string): for shows in self.re_ShowdownAction.finditer(hand.string):
cards = shows.group('CARDS') cards = shows.group('CARDS')
cards = set(cards.split(', ')) cards = cards.split(', ')
hand.addShownCards(cards, shows.group('PNAME')) hand.addShownCards(cards, shows.group('PNAME'))
def readCollectPot(self,hand): def readCollectPot(self,hand):
@ -208,10 +209,11 @@ class Everleaf(HandHistoryConverter):
hand.addCollectPot(player=m.group('PNAME'),pot=m.group('POT')) hand.addCollectPot(player=m.group('PNAME'),pot=m.group('POT'))
def readShownCards(self,hand): def readShownCards(self,hand):
"""Reads lines where hole & board cards are mixed to form a hand (summary lines)"""
for m in self.re_CollectPot.finditer(hand.string): for m in self.re_CollectPot.finditer(hand.string):
if m.group('CARDS') is not None: if m.group('CARDS') is not None:
cards = m.group('CARDS') cards = m.group('CARDS')
cards = set(cards.split(', ')) cards = cards.split(', ')
hand.addShownCards(cards=None, player=m.group('PNAME'), holeandboard=cards) hand.addShownCards(cards=None, player=m.group('PNAME'), holeandboard=cards)