Fix bug inmporting Everleaf PLO

This commit is contained in:
Worros 2009-03-01 23:05:21 +09:00
parent ca9ed06351
commit 3cf8239cc9
3 changed files with 6 additions and 6 deletions

View File

@ -62,7 +62,7 @@ class Everleaf(HandHistoryConverter):
def readSupportedGames(self): def readSupportedGames(self):
return [["ring", "hold", "nl"], return [["ring", "hold", "nl"],
["ring", "hold", "pl"], ["ring", "hold", "pl"],
["ring", "omaha", "pl"] ["ring", "omahahi", "pl"]
] ]
def determineGameType(self): def determineGameType(self):
@ -221,7 +221,7 @@ class Everleaf(HandHistoryConverter):
if __name__ == "__main__": if __name__ == "__main__":
c = Configuration.Config() c = Configuration.Config()
if len(sys.argv) == 1: if len(sys.argv) == 1:
testfile = "regression-test-files/everleaf/Speed_Kuala_full.txt" testfile = "regression-test-files/everleaf/plo/Naos.txt"
else: else:
testfile = sys.argv[1] testfile = sys.argv[1]
e = Everleaf(c, testfile) e = Everleaf(c, testfile)

View File

@ -39,7 +39,7 @@ 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] == "omahahi":
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','THIRD','FOURTH','FIFTH','SIXTH','SEVENTH'] # a list of the observed street names in order self.streetList = ['ANTES','THIRD','FOURTH','FIFTH','SIXTH','SEVENTH'] # a list of the observed street names in order
@ -403,7 +403,7 @@ Map the tuple self.gametype onto the pokerstars string describing it
return string return string
def writeHand(self, fh=sys.__stdout__): def writeHand(self, fh=sys.__stdout__):
if self.gametype[1] == "hold" or self.gametype[1] == "omaha": if self.gametype[1] == "hold" or self.gametype[1] == "omahahi":
self.writeHoldemHand(fh) self.writeHoldemHand(fh)
else: else:
self.writeStudHand(fh) self.writeStudHand(fh)

View File

@ -141,7 +141,7 @@ class HandHistoryConverter:
self.markStreets(hand) self.markStreets(hand)
# Different calls if stud or holdem like # Different calls if stud or holdem like
if self.gametype[1] == "hold" or self.gametype[1] == "omaha": if self.gametype[1] == "hold" or self.gametype[1] == "omahahi":
self.readBlinds(hand) self.readBlinds(hand)
self.readButton(hand) self.readButton(hand)
self.readHeroCards(hand) # want to generalise to draw games self.readHeroCards(hand) # want to generalise to draw games
@ -155,7 +155,7 @@ class HandHistoryConverter:
for street in hand.streetList: # go through them in order for street in hand.streetList: # go through them in order
print "DEBUG: ", street print "DEBUG: ", street
if hand.streets.group(street) is not None: if hand.streets.group(street) is not None:
if self.gametype[1] == "hold" or self.gametype[1] == "omaha": if self.gametype[1] == "hold" or self.gametype[1] == "omahahi":
self.readCommunityCards(hand, street) # read community cards self.readCommunityCards(hand, street) # read community cards
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.readPlayerCards(hand, street) self.readPlayerCards(hand, street)