Merge branch 'master' of git://git.assembla.com/fpdboz
This commit is contained in:
commit
6e01ebaee2
|
@ -399,6 +399,7 @@ class HoldemOmahaHand(Hand):
|
|||
#Populate a HoldemOmahaHand
|
||||
#Generally, we call 'read' methods here, which get the info according to the particular filter (hhc)
|
||||
# which then invokes a 'addXXX' callback
|
||||
if builtFrom == "HHC":
|
||||
hhc.readHandInfo(self)
|
||||
hhc.readPlayerStacks(self)
|
||||
hhc.compilePlayerRegexs(self)
|
||||
|
@ -418,6 +419,8 @@ class HoldemOmahaHand(Hand):
|
|||
hhc.readShownCards(self)
|
||||
self.totalPot() # finalise it (total the pot)
|
||||
hhc.getRake(self)
|
||||
elif builtFrom == "DB":
|
||||
self.select("dummy") # Will need a handId
|
||||
|
||||
def addHoleCards(self, cards, player, shown=False):
|
||||
"""\
|
||||
|
@ -553,6 +556,7 @@ class DrawHand(Hand):
|
|||
self.sb = gametype['sb']
|
||||
self.bb = gametype['bb']
|
||||
# Populate the draw hand.
|
||||
if builtFrom == "HHC":
|
||||
hhc.readHandInfo(self)
|
||||
hhc.readPlayerStacks(self)
|
||||
hhc.compilePlayerRegexs(self)
|
||||
|
@ -570,7 +574,8 @@ class DrawHand(Hand):
|
|||
hhc.readShownCards(self)
|
||||
self.totalPot() # finalise it (total the pot)
|
||||
hhc.getRake(self)
|
||||
|
||||
elif builtFrom == "DB":
|
||||
self.select("dummy") # Will need a handId
|
||||
|
||||
# Draw games (at least Badugi has blinds - override default Holdem addBlind
|
||||
def addBlind(self, player, blindtype, amount):
|
||||
|
@ -733,13 +738,14 @@ class StudHand(Hand):
|
|||
#Populate the StudHand
|
||||
#Generally, we call a 'read' method here, which gets the info according to the particular filter (hhc)
|
||||
# which then invokes a 'addXXX' callback
|
||||
if builtFrom == "HHC":
|
||||
hhc.readHandInfo(self)
|
||||
hhc.readPlayerStacks(self)
|
||||
hhc.compilePlayerRegexs(self)
|
||||
hhc.markStreets(self)
|
||||
hhc.readAntes(self)
|
||||
hhc.readBringIn(self)
|
||||
# hhc.readShowdownActions(self) # not done yet
|
||||
#hhc.readShowdownActions(self) # not done yet
|
||||
# Read actions in street order
|
||||
for street in self.streetList:
|
||||
if self.streets[street]:
|
||||
|
@ -748,9 +754,11 @@ class StudHand(Hand):
|
|||
hhc.readStudPlayerCards(self, street)
|
||||
hhc.readAction(self, street)
|
||||
hhc.readCollectPot(self)
|
||||
# hhc.readShownCards(self) # not done yet
|
||||
#hhc.readShownCards(self) # not done yet
|
||||
self.totalPot() # finalise it (total the pot)
|
||||
hhc.getRake(self)
|
||||
elif builtFrom == "DB":
|
||||
self.select("dummy") # Will need a handId
|
||||
|
||||
def addPlayerCards(self, player, street, open=[], closed=[]):
|
||||
"""\
|
||||
|
|
|
@ -1,10 +1,21 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import PokerStarsToFpdb
|
||||
from Hand import *
|
||||
import py
|
||||
|
||||
#regression-test-files/stars/badugi/ring-fl-badugi.txt
|
||||
# s0rrow: start $30.00 end: $22.65 total: ($7.35)
|
||||
|
||||
gametype = {'type':'ring', 'base':'draw', 'category':'badugi', 'limitType':'fl', 'sb':'0.25', 'bb':'0.50','currency':'USD'}
|
||||
text = ""
|
||||
|
||||
hhc = PokerStarsToFpdb.PokerStars(autostart=False)
|
||||
|
||||
h = HoldemOmahaHand(None, "ASite", gametype, text, builtFrom = "Test")
|
||||
h.addPlayer("1", "s0rrow", "100000")
|
||||
|
||||
hhc.compilePlayerRegexs(h)
|
||||
|
||||
|
||||
def checkGameInfo(hhc, header, info):
|
||||
assert hhc.determineGameType(header) == info
|
||||
|
|
Loading…
Reference in New Issue
Block a user