diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py index 043d37b1..50d69568 100755 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -67,9 +67,9 @@ class FullTilt(HandHistoryConverter): m = self.re_GameInfo.search(self.obs) - if m.group('LTYPE') == "No": + if m.group('LTYPE') == "No ": structure = "nl" - elif m.group('LTYPE') == "Pot": + elif m.group('LTYPE') == "Pot ": structure = "pl" elif m.group('LTYPE') == "None": structure = "fl" @@ -81,7 +81,6 @@ class FullTilt(HandHistoryConverter): elif m.group('GAME') == "Razz": game = "razz" - gametype = ["ring", game, structure, m.group('SB'), m.group('BB')] return gametype @@ -123,8 +122,12 @@ class FullTilt(HandHistoryConverter): r"(\*\*\* TURN \*\*\* \[\S\S \S\S \S\S] (?P\[\S\S\].+(?=\*\*\* RIVER \*\*\*)|.+))?" r"(\*\*\* RIVER \*\*\* \[\S\S \S\S \S\S \S\S] (?P\[\S\S\].+))?", hand.string,re.DOTALL) elif self.gametype[1] == "razz": - m = re.search("\*\*\*(?P.+(?=\*\*\* 3RD STREET \*\*\*)|.+)", hand.string,re.DOTALL) - + m = re.search(r"(?P.+(?=\*\*\* 3RD STREET \*\*\*)|.+)" + r"(\*\*\* 3RD STREET \*\*\*(?P.+(?=\*\*\* 4TH STREET \*\*\*)|.+))?" + r"(\*\*\* 4TH STREET \*\*\*(?P.+(?=\*\*\* 5TH STREET \*\*\*)|.+))?" + r"(\*\*\* 5TH STREET \*\*\*(?P.+(?=\*\*\* 6TH STREET \*\*\*)|.+))?" + r"(\*\*\* 6TH STREET \*\*\*(?P.+(?=\*\*\* 7TH STREET \*\*\*)|.+))?" + r"(\*\*\* 7TH STREET \*\*\*(?P.+))?", hand.string,re.DOTALL) hand.addStreets(m) def readCommunityCards(self, hand, street): # street has been matched by markStreets, so exists in this hand diff --git a/pyfpdb/Hand.py b/pyfpdb/Hand.py index 9c4fc658..a461e95e 100644 --- a/pyfpdb/Hand.py +++ b/pyfpdb/Hand.py @@ -39,10 +39,10 @@ class Hand: self.gametype = gametype self.string = string - #if gametype[1] == "hold" or self.gametype[1] == "omaha": - self.streetList = ['PREFLOP','FLOP','TURN','RIVER'] # a list of the observed street names in order - #elif self.gametype[1] == "razz" or self.gametype[1] == "stud" or self.gametype[1] == "stud8": - #self.streetList = ['ANTES','3RD','4TH','5TH','6TH','7TH'] # a list of the observed street names in order + if gametype[1] == "hold" or self.gametype[1] == "omaha": + self.streetList = ['PREFLOP','FLOP','TURN','RIVER'] # a list of the observed street names in order + elif self.gametype[1] == "razz" or self.gametype[1] == "stud" or self.gametype[1] == "stud8": + self.streetList = ['ANTES','THIRD','FORTH','FIFTH','SIXTH','SEVENTH'] # a list of the observed street names in order self.handid = 0 self.sb = gametype[3]