Fulltilt nlhe working, more razz stuff

Everleaf still broken - need to create/move button regex to new abstract
method
This commit is contained in:
Worros 2009-02-25 02:05:51 +09:00
parent 7fd90ce760
commit a4f0e9a1fd
2 changed files with 12 additions and 9 deletions

View File

@ -67,9 +67,9 @@ class FullTilt(HandHistoryConverter):
m = self.re_GameInfo.search(self.obs) m = self.re_GameInfo.search(self.obs)
if m.group('LTYPE') == "No": if m.group('LTYPE') == "No ":
structure = "nl" structure = "nl"
elif m.group('LTYPE') == "Pot": elif m.group('LTYPE') == "Pot ":
structure = "pl" structure = "pl"
elif m.group('LTYPE') == "None": elif m.group('LTYPE') == "None":
structure = "fl" structure = "fl"
@ -81,7 +81,6 @@ class FullTilt(HandHistoryConverter):
elif m.group('GAME') == "Razz": elif m.group('GAME') == "Razz":
game = "razz" game = "razz"
gametype = ["ring", game, structure, m.group('SB'), m.group('BB')] gametype = ["ring", game, structure, m.group('SB'), m.group('BB')]
return gametype return gametype
@ -123,8 +122,12 @@ class FullTilt(HandHistoryConverter):
r"(\*\*\* TURN \*\*\* \[\S\S \S\S \S\S] (?P<TURN>\[\S\S\].+(?=\*\*\* RIVER \*\*\*)|.+))?" r"(\*\*\* TURN \*\*\* \[\S\S \S\S \S\S] (?P<TURN>\[\S\S\].+(?=\*\*\* RIVER \*\*\*)|.+))?"
r"(\*\*\* RIVER \*\*\* \[\S\S \S\S \S\S \S\S] (?P<RIVER>\[\S\S\].+))?", hand.string,re.DOTALL) r"(\*\*\* RIVER \*\*\* \[\S\S \S\S \S\S \S\S] (?P<RIVER>\[\S\S\].+))?", hand.string,re.DOTALL)
elif self.gametype[1] == "razz": elif self.gametype[1] == "razz":
m = re.search("\*\*\*(?P<THIRD>.+(?=\*\*\* 3RD STREET \*\*\*)|.+)", hand.string,re.DOTALL) m = re.search(r"(?P<ANTES>.+(?=\*\*\* 3RD STREET \*\*\*)|.+)"
r"(\*\*\* 3RD STREET \*\*\*(?P<THIRD>.+(?=\*\*\* 4TH STREET \*\*\*)|.+))?"
r"(\*\*\* 4TH STREET \*\*\*(?P<FOURTH>.+(?=\*\*\* 5TH STREET \*\*\*)|.+))?"
r"(\*\*\* 5TH STREET \*\*\*(?P<FIFTH>.+(?=\*\*\* 6TH STREET \*\*\*)|.+))?"
r"(\*\*\* 6TH STREET \*\*\*(?P<SIXTH>.+(?=\*\*\* 7TH STREET \*\*\*)|.+))?"
r"(\*\*\* 7TH STREET \*\*\*(?P<SEVENTH>.+))?", hand.string,re.DOTALL)
hand.addStreets(m) hand.addStreets(m)
def readCommunityCards(self, hand, street): # street has been matched by markStreets, so exists in this hand def readCommunityCards(self, hand, street): # street has been matched by markStreets, so exists in this hand

View File

@ -39,10 +39,10 @@ class Hand:
self.gametype = gametype self.gametype = gametype
self.string = string self.string = string
#if gametype[1] == "hold" or self.gametype[1] == "omaha": if gametype[1] == "hold" or self.gametype[1] == "omaha":
self.streetList = ['PREFLOP','FLOP','TURN','RIVER'] # a list of the observed street names in order 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": 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 self.streetList = ['ANTES','THIRD','FORTH','FIFTH','SIXTH','SEVENTH'] # a list of the observed street names in order
self.handid = 0 self.handid = 0
self.sb = gametype[3] self.sb = gametype[3]