[NEWIMPORT] Add HandsPlayers.totalProfit

Grapher now works after import yay
This commit is contained in:
Worros 2009-11-24 17:29:54 +08:00
parent d65ee55b64
commit 48c395565e
2 changed files with 7 additions and 5 deletions

View File

@ -1396,6 +1396,7 @@ class Database:
pdata[p]['card7'],
pdata[p]['winnings'],
pdata[p]['rake'],
pdata[p]['totalProfit'],
pdata[p]['street0VPI'],
pdata[p]['street1Seen'],
pdata[p]['street2Seen'],
@ -1422,6 +1423,7 @@ class Database:
card7,
winnings,
rake,
totalProfit,
street0VPI,
street1Seen,
street2Seen,
@ -1434,7 +1436,7 @@ class Database:
street4Aggr
)
VALUES (
%s, %s, %s,
%s, %s, %s, %s,
%s, %s, %s, %s, %s,
%s, %s, %s, %s, %s,
%s, %s, %s, %s, %s,
@ -1444,7 +1446,6 @@ class Database:
# position,
# tourneyTypeId,
# startCards,
# totalProfit,
# street0_3BChance,
# street0_3BDone,
# sawShowdown,

View File

@ -40,6 +40,7 @@ class DerivedStats():
# All stud street4 need this when importing holdem
self.handsplayers[player[1]]['winnings'] = 0
self.handsplayers[player[1]]['rake'] = 0
self.handsplayers[player[1]]['totalProfit'] = 0
self.handsplayers[player[1]]['street4Seen'] = False
self.handsplayers[player[1]]['street4Aggr'] = False
@ -96,9 +97,6 @@ class DerivedStats():
#print "DEBUG: playersAtStreet 1:'%s' 2:'%s' 3:'%s' 4:'%s'" %(self.hands['playersAtStreet1'],self.hands['playersAtStreet2'],self.hands['playersAtStreet3'],self.hands['playersAtStreet4'])
self.streetXRaises(hand) # Empty function currently
# comment TEXT,
# commentTs DATETIME
def assembleHandsPlayers(self, hand):
#street0VPI/vpip already called in Hand
#hand.players = [[seat, name, chips],[seat, name, chips]]
@ -116,6 +114,9 @@ class DerivedStats():
# Should be fine for split-pots, but won't be accurate for multi-way pots
self.handsplayers[player]['rake'] = int(100* hand.rake)/len(hand.collectees)
for player in hand.pot.committed:
self.handsplayers[player]['totalProfit'] = int(self.handsplayers[player]['winnings'] - (100*hand.pot.committed[player]))
for i, street in enumerate(hand.actionStreets[2:]):
self.seen(self.hand, i+1)