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

Conflicts:
	pyfpdb/PartyPokerToFpdb.py
This commit is contained in:
grindi 2009-12-21 09:38:43 +03:00
commit 7eeace5862
4 changed files with 19 additions and 10 deletions

View File

@ -1651,7 +1651,8 @@ class Database:
pdata[p]['street2CheckCallRaiseDone'],
pdata[p]['street3CheckCallRaiseChance'],
pdata[p]['street3CheckCallRaiseDone'],
pdata[p]['street4CheckCallRaiseChance']
pdata[p]['street4CheckCallRaiseChance'],
pdata[p]['street4CheckCallRaiseDone']
) )
q = self.sql.query['store_hands_players']

View File

@ -168,8 +168,10 @@ class DerivedStats():
for player in hand.players:
hcs = hand.join_holecards(player[1], asList=True)
hcs = hcs + [u'0x', u'0x', u'0x', u'0x', u'0x']
for i, card in enumerate(hcs[:7], 1):
self.handsplayers[player[1]]['card%s' % i] = Card.encodeCard(card)
#for i, card in enumerate(hcs[:7], 1): #Python 2.6 syntax
# self.handsplayers[player[1]]['card%s' % i] = Card.encodeCard(card)
for i, card in enumerate(hcs[:7]):
self.handsplayers[player[1]]['card%s' % (i+1)] = Card.encodeCard(card)
# position,
@ -266,13 +268,17 @@ class DerivedStats():
# Then no bets before the player with initiatives first action on current street
# ie. if player on street-1 had initiative
# and no donkbets occurred
for i, street in enumerate(hand.actionStreets[2:], start=1):
name = self.lastBetOrRaiser(hand.actionStreets[i])
# XXX: enumerate(list, start=x) is python 2.6 syntax; 'start'
# came there
#for i, street in enumerate(hand.actionStreets[2:], start=1):
for i, street in enumerate(hand.actionStreets[2:]):
name = self.lastBetOrRaiser(hand.actionStreets[i+1])
if name:
chance = self.noBetsBefore(hand.actionStreets[i+1], name)
self.handsplayers[name]['street%dCBChance' %i] = True
chance = self.noBetsBefore(hand.actionStreets[i+2], name)
self.handsplayers[name]['street%dCBChance' % (i+1)] = True
if chance == True:
self.handsplayers[name]['street%dCBDone' %i] = self.betStreet(hand.actionStreets[i+1], name)
self.handsplayers[name]['street%dCBDone' % (i+1)] = self.betStreet(hand.actionStreets[i+2], name)
def seen(self, hand, i):
pas = set()

View File

@ -85,6 +85,7 @@ class PartyPoker(HandHistoryConverter):
(?P<TABLE_ID_WRAPPER>\(|\#| ) # \# means sng, ( - mtt, nothing - cash game
(?P<TABLE_ID>\d+) \)? \s+ # it's global unique id for this table
(?:Table\s+\#(?P<TABLE_NUM>\d+).+)? # table num for mtt tournaments
(\(No\sDP\)\s)?
\((?P<PLAY>Real|Play)\s+Money\)\s*
""",
re.VERBOSE|re.MULTILINE)

View File

@ -3404,10 +3404,11 @@ class Sql:
street2CheckCallRaiseDone,
street3CheckCallRaiseChance,
street3CheckCallRaiseDone,
street4CheckCallRaiseChance
street4CheckCallRaiseChance,
street4CheckCallRaiseDone
)
VALUES (
%s, %s, %s, %s,
%s, %s, %s, %s, %s,
%s, %s, %s, %s, %s,
%s, %s, %s, %s, %s,
%s, %s, %s, %s, %s,