From 25ae39d7b54c2517bbd3a9b7cc5e13c1de010236 Mon Sep 17 00:00:00 2001 From: Worros Date: Tue, 3 Mar 2009 00:10:15 +0900 Subject: [PATCH] Minor fixups: set->list and FullTilt lookup table --- pyfpdb/EverleafToFpdb.py | 1 + pyfpdb/FulltiltToFpdb.py | 8 ++++---- pyfpdb/Hand.py | 7 ++++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pyfpdb/EverleafToFpdb.py b/pyfpdb/EverleafToFpdb.py index 1f8ecbeb..175b4695 100755 --- a/pyfpdb/EverleafToFpdb.py +++ b/pyfpdb/EverleafToFpdb.py @@ -62,6 +62,7 @@ class Everleaf(HandHistoryConverter): def readSupportedGames(self): return [["ring", "hold", "nl"], ["ring", "hold", "pl"], + ["ring", "hold", "fl"], ["ring", "omahahi", "pl"] ] diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py index 2d2e36d1..c03c056b 100755 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -181,7 +181,7 @@ class FullTilt(HandHistoryConverter): # "2c, qh" -> set(["2c","qc"]) # Also works with Omaha hands. cards = m.group('CARDS') - cards = set(cards.split(' ')) + cards = cards.split(' ') hand.addHoleCards(cards, m.group('PNAME')) def readPlayerCards(self, hand, street): @@ -195,7 +195,7 @@ class FullTilt(HandHistoryConverter): if player.group('NEWCARD') != None: print cards cards = cards + " " + player.group('NEWCARD') - cards = set(cards.split(' ')) + cards = cards.split(' ') hand.addPlayerCards(cards, player.group('PNAME')) def readAction(self, hand, street): @@ -218,7 +218,7 @@ class FullTilt(HandHistoryConverter): def readShowdownActions(self, hand): for shows in self.re_ShowdownAction.finditer(hand.string): cards = shows.group('CARDS') - cards = set(cards.split(' ')) + cards = cards.split(' ') hand.addShownCards(cards, shows.group('PNAME')) def readCollectPot(self,hand): @@ -229,7 +229,7 @@ class FullTilt(HandHistoryConverter): for m in self.re_ShownCards.finditer(hand.string): if m.group('CARDS') is not None: cards = m.group('CARDS') - cards = set(cards.split(' ')) + cards = cards.split(' ') hand.addShownCards(cards=cards, player=m.group('PNAME')) diff --git a/pyfpdb/Hand.py b/pyfpdb/Hand.py index 16549cb0..74a12106 100644 --- a/pyfpdb/Hand.py +++ b/pyfpdb/Hand.py @@ -409,7 +409,12 @@ Map the tuple self.gametype onto the pokerstars string describing it "0.20" : ("0.05", "0.10"), "0.50" : ("0.10", "0.25"), "1.00" : ("0.25", "0.50") - + }, + "FullTilt" : { "0.10" : ("0.02", "0.05"), + "0.20" : ("0.05", "0.10"), + "1" : ("0.25", "0.50"), + "2" : ("0.50", "1"), + "4" : ("1", "2") } } return betlist[self.sitename][self.bb]