include antes in hudcache totalProfit figure

This commit is contained in:
sqlcoder 2008-12-13 02:02:07 +00:00
parent a03a6852e8
commit 167c0de3b5
2 changed files with 7 additions and 5 deletions

View File

@ -135,11 +135,11 @@ def mainParser(backend, db, cursor, site, category, hand):
if base=="hold":
hudImportData=fpdb_simple.generateHudCacheData(playerIDs, base, category, actionTypes
, allIns, actionTypeByNo, winnings, totalWinnings, positions
, actionTypes, actionAmounts)
, actionTypes, actionAmounts, None)
else:
hudImportData=fpdb_simple.generateHudCacheData(playerIDs, base, category, actionTypes
, allIns, actionTypeByNo, winnings, totalWinnings, None
, actionTypes, actionAmounts)
, actionTypes, actionAmounts, antes)
if isTourney:
ranks=[]
@ -185,7 +185,7 @@ def mainParser(backend, db, cursor, site, category, hand):
, seatNos)
else:
raise fpdb_simple.FpdbError ("unrecognised category")
db.commit()
db.commit()
return result
#end def mainParser

View File

@ -1426,7 +1426,7 @@ VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
#end def store_hands_players_stud_tourney
def generateHudCacheData(player_ids, base, category, action_types, allIns, actionTypeByNo
,winnings, totalWinnings, positions, actionTypes, actionAmounts):
,winnings, totalWinnings, positions, actionTypes, actionAmounts, antes):
"""calculates data for the HUD during import. IMPORTANT: if you change this method make
sure to also change the following storage method and table_viewer.prepare_data if necessary
"""
@ -1953,7 +1953,9 @@ sure to also change the following storage method and table_viewer.prepare_data i
#print "b4 totprof calc, len(playerIds)=", len(player_ids)
for pl in range (len(player_ids)):
#print "pl=", pl
myTotalProfit=winnings[pl] # still need to deduct costs
myTotalProfit=winnings[pl] # still need to deduct other costs
if antes:
myTotalProfit=winnings[pl] - antes[pl]
for i in range (len(actionTypes)): #iterate through streets
#for j in range (len(actionTypes[i])): #iterate through names (using pl loop above)
for k in range (len(actionTypes[i][pl])): #iterate through individual actions of that player on that street