-
-
Save anonymous/e6ce9a01ddcd23b1eb79 to your computer and use it in GitHub Desktop.
holecards diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modified pyfpdb/Hand.py | |
@@ -378,6 +378,9 @@ class Hand(object): | |
q = db.sql.query['playerHand'] | |
q = q.replace('%s', db.sql.query['placeholder']) | |
+ c.execute("select heroseat from Hands where id = {}".format(handId)) | |
+ heroSeat = c.fetchone()[0] | |
+ | |
# PlayerStacks | |
c.execute(q, (handId,)) | |
# See NOTE: below on what this does. | |
@@ -408,7 +411,7 @@ class Hand(object): | |
cardlist.append(Card.valueSuitFromCard(row['card19'])) | |
cardlist.append(Card.valueSuitFromCard(row['card20'])) | |
# mucked/shown/dealt is not in the database, use mucked for villain and dealt for hero | |
- if row['name'] == self.hero: | |
+ if row['seatno'] == heroSeat: | |
dealt=True | |
mucked=False | |
else: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment