From c88ccd11409a6613adc6a2f02a4ab5b00b080848 Mon Sep 17 00:00:00 2001 From: Worros Date: Sat, 23 Jan 2010 02:18:20 +0800 Subject: [PATCH] Remove unused convert_cards() --- pyfpdb/Database.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index c7b3e3b8..5f3c7c34 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -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()