Some bringin code for stud/razz

This commit is contained in:
Worros 2009-02-26 01:23:46 +09:00
parent a71be6ddd3
commit 354a67c0e4
2 changed files with 10 additions and 0 deletions

View File

@ -166,6 +166,7 @@ class FullTilt(HandHistoryConverter):
# print hand.string # print hand.string
m = self.re_BringIn.search(hand.string,re.DOTALL) m = self.re_BringIn.search(hand.string,re.DOTALL)
print "DEBUG: Player bringing in: %s for %s" %(m.group('PNAME'), m.group('BRINGIN')) print "DEBUG: Player bringing in: %s for %s" %(m.group('PNAME'), m.group('BRINGIN'))
hand.addBringIn(m.group('PNAME'), m.group('BRINGIN'))
def readButton(self, hand): def readButton(self, hand):
hand.buttonpos = int(self.re_Button.search(hand.string).group('BUTTON')) hand.buttonpos = int(self.re_Button.search(hand.string).group('BUTTON'))

View File

@ -221,6 +221,14 @@ Card ranks will be uppercased
self.posted = self.posted + [[player,blindtype]] self.posted = self.posted + [[player,blindtype]]
#print "DEBUG: self.posted: %s" %(self.posted) #print "DEBUG: self.posted: %s" %(self.posted)
def addBringIn(self, player, ante):
if player is not None:
self.bets['THIRD'][player].append(Decimal(ante))
self.stacks[player] -= Decimal(ante)
act = (player, 'bringin', "bringin", ante, self.stacks[player]==0)
self.actions['THIRD'].append(act)
self.pot.addMoney(player, Decimal(ante))
def addCall(self, street, player=None, amount=None): def addCall(self, street, player=None, amount=None):
# Potentially calculate the amount of the call if not supplied # Potentially calculate the amount of the call if not supplied
@ -513,6 +521,7 @@ Map the tuple self.gametype onto the pokerstars string describing it
if 'THIRD' in self.actions: if 'THIRD' in self.actions:
print >>fh, _("*** 3RD STREET ***") print >>fh, _("*** 3RD STREET ***")
for act in self.actions['THIRD']: for act in self.actions['THIRD']:
#FIXME: Need some logic here for bringin vs completes
self.printActionLine(act, fh) self.printActionLine(act, fh)
if 'FOURTH' in self.actions: if 'FOURTH' in self.actions: