Stars/Hand: Fix issue produced by last regression test file

7-Stud-USD-0.04-0.08-200907.Missing.Showdown.Card.txt only contains 6 showdown cards.

Put filthy hack in addShownCards to guard against this condition, and add a commented out debug print in the HHC
This commit is contained in:
Worros 2010-09-09 13:19:19 +08:00
parent 34f0c93351
commit e1bb9a602b
2 changed files with 3 additions and 1 deletions

View File

@ -1224,6 +1224,7 @@ class StudHand(Hand):
self.addHoleCards('FOURTH', player, open=[cards[3]], closed=[cards[2]], shown=shown, mucked=mucked)
self.addHoleCards('FIFTH', player, open=[cards[4]], closed=cards[2:4], shown=shown, mucked=mucked)
self.addHoleCards('SIXTH', player, open=[cards[5]], closed=cards[2:5], shown=shown, mucked=mucked)
if len(cards) > 6:
self.addHoleCards('SEVENTH', player, open=[], closed=[cards[6]], shown=shown, mucked=mucked)

View File

@ -454,6 +454,7 @@ class PokerStars(HandHistoryConverter):
if m.group('SHOWED') == "showed": shown = True
elif m.group('SHOWED') == "mucked": mucked = True
#print "DEBUG: hand.addShownCards(%s, %s, %s, %s)" %(cards, m.group('PNAME'), shown, mucked)
hand.addShownCards(cards=cards, player=m.group('PNAME'), shown=shown, mucked=mucked)
if __name__ == "__main__":