Remove unused convert_cards()
This commit is contained in:
parent
ea423f6b2c
commit
c88ccd1140
|
@ -359,28 +359,6 @@ class Database:
|
|||
cards['common'] = c.fetchone()
|
||||
return cards
|
||||
|
||||
def convert_cards(self, d):
|
||||
ranks = ('', '', '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K', 'A')
|
||||
cards = ""
|
||||
for i in xrange(1, 8):
|
||||
# key = 'card' + str(i) + 'Value'
|
||||
# if not d.has_key(key): continue
|
||||
# if d[key] == None:
|
||||
# break
|
||||
# elif d[key] == 0:
|
||||
# cards += "xx"
|
||||
# else:
|
||||
# cards += ranks[d['card' + str(i) + 'Value']] + d['card' +str(i) + 'Suit']
|
||||
cv = "card%dvalue" % i
|
||||
if cv not in d or d[cv] is None:
|
||||
break
|
||||
elif d[cv] == 0:
|
||||
cards += "xx"
|
||||
else:
|
||||
cs = "card%dsuit" % i
|
||||
cards = "%s%s%s" % (cards, ranks[d[cv]], d[cs])
|
||||
return cards
|
||||
|
||||
def get_action_from_hand(self, hand_no):
|
||||
action = [ [], [], [], [], [] ]
|
||||
c = self.connection.cursor()
|
||||
|
|
Loading…
Reference in New Issue
Block a user