Fix findHeroCards() for empty streets.

This commit is contained in:
Ray 2009-07-15 11:48:58 -04:00
parent 021b9934ea
commit 0e76c3a676

View File

@ -299,6 +299,7 @@ follow : whether to tail -f the input"""
for street, text in hand.streets.iteritems():
if street in ('PREFLOP', 'DEAL'): continue # already done these
if hand.streets[street] == None: continue # don't regex a None
m = self.re_HeroCards.finditer(hand.streets[street])
for found in m:
player = found.group('PNAME')
@ -398,7 +399,7 @@ follow : whether to tail -f the input"""
def readShowdownActions(self, hand):
# TODO: pick up mucks also
# TODO: pick up mucks also??
for shows in self.re_ShowdownAction.finditer(hand.handText):
cards = shows.group('CARDS').split(' ')
hand.addShownCards(cards, shows.group('PNAME'))