More for Flop_Mucked with 0-52 encoding.

This commit is contained in:
Ray 2009-06-19 15:51:56 -04:00
parent e00887b865
commit a307081574
2 changed files with 10 additions and 19 deletions

View File

@ -170,12 +170,8 @@ class Database:
cards = {} cards = {}
c = self.connection.cursor() c = self.connection.cursor()
c.execute(self.sql.query['get_common_cards'], [hand]) c.execute(self.sql.query['get_common_cards'], [hand])
colnames = [desc[0] for desc in c.description] # row = c.fetchone()
for row in c.fetchall(): cards['common'] = c.fetchone()
s_dict = {}
for name, val in zip(colnames, row):
s_dict[name] = val
cards['common'] = (self.convert_cards(s_dict))
return cards return cards
def convert_cards(self, d): def convert_cards(self, d):

View File

@ -542,18 +542,13 @@ class Sql:
self.query['get_common_cards'] = """ self.query['get_common_cards'] = """
select select
card1Value AS card1value, boardcard1,
card1Suit AS card1suit, boardcard2,
card2Value AS card2value, boardcard3,
card2Suit AS card2suit, boardcard4,
card3Value AS card3value, boardcard5
card3Suit AS card3suit, from Hands
card4Value AS card4value, where Id = %s
card4Suit AS card4suit,
card5Value AS card5value,
card5Suit AS card5suit
from BoardCards
where handId = %s
""" """
self.query['get_action_from_hand'] = """ self.query['get_action_from_hand'] = """