Skip to content

Instantly share code, notes, and snippets.

Created September 24, 2015 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/e6ce9a01ddcd23b1eb79 to your computer and use it in GitHub Desktop.
Save anonymous/e6ce9a01ddcd23b1eb79 to your computer and use it in GitHub Desktop.
holecards diff
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