set -> list

This commit is contained in:
Matt Turnbull 2009-02-26 16:04:08 +00:00
parent 6d862cff52
commit ca57a5a5ff

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)