Merge branch 'master' of git://git.assembla.com/fpdboz

This commit is contained in:
Matt Turnbull 2009-03-14 13:45:40 +00:00
commit c1a7c45966
2 changed files with 15 additions and 8 deletions

View File

@ -272,14 +272,6 @@ Add a raise on [street] by [player] to [amountTo]
self.lastBet[street] = Decimal(amount)
self.pot.addMoney(player, Decimal(amount))
def addDiscard(self, street, player, num, cards):
self.checkPlayerExists(player)
if cards:
act = (player, 'discards', num, cards)
self.discardDrawHoleCards(cards, player, street)
else:
act = (player, 'discards', num)
self.actions[street].append(act)
def addStandsPat(self, street, player):
self.checkPlayerExists(player)
@ -622,10 +614,22 @@ player (string) name of player
except FpdbParseError, e:
print "[ERROR] Tried to add holecards for unknown player: %s" % (player,)
def discardDrawHoleCards(self, cards, player, street):
logging.debug("discardDrawHoleCards '%s' '%s' '%s'" % (cards, player, street))
self.discards[player][street] = set([cards])
def addDiscard(self, street, player, num, cards):
self.checkPlayerExists(player)
if cards:
act = (player, 'discards', num, cards)
self.discardDrawHoleCards(cards, player, street)
else:
act = (player, 'discards', num)
self.actions[street].append(act)
def addShownCards(self, cards, player, holeandboard=None):
"""\
For when a player shows cards for any reason (for showdown or out of choice).
@ -640,6 +644,7 @@ Card ranks will be uppercased
# board = set([c for s in self.board.values() for c in s])
# self.addHoleCards(holeandboard.difference(board),player,shown=True)
def writeHand(self, fh=sys.__stdout__):
# PokerStars format.
print >>fh, _("%s Game #%s: %s ($%s/$%s) - %s" %("PokerStars", self.handid, self.getGameTypeAsString(), self.sb, self.bb, time.strftime('%Y/%m/%d %H:%M:%S ET', self.starttime)))

View File

@ -2,6 +2,8 @@
import FulltiltToFpdb
import py
# regression-test-files/fulltilt/nlhe/NLHE-6max-1.txt
# Sorrowful: start: $8.85 end: $14.70 total: $5.85
def checkGameInfo(hhc, header, info):
assert hhc.determineGameType(header) == info