include antes in hudcache totalProfit figure
This commit is contained in:
parent
a03a6852e8
commit
167c0de3b5
|
@ -135,11 +135,11 @@ def mainParser(backend, db, cursor, site, category, hand):
|
||||||
if base=="hold":
|
if base=="hold":
|
||||||
hudImportData=fpdb_simple.generateHudCacheData(playerIDs, base, category, actionTypes
|
hudImportData=fpdb_simple.generateHudCacheData(playerIDs, base, category, actionTypes
|
||||||
, allIns, actionTypeByNo, winnings, totalWinnings, positions
|
, allIns, actionTypeByNo, winnings, totalWinnings, positions
|
||||||
, actionTypes, actionAmounts)
|
, actionTypes, actionAmounts, None)
|
||||||
else:
|
else:
|
||||||
hudImportData=fpdb_simple.generateHudCacheData(playerIDs, base, category, actionTypes
|
hudImportData=fpdb_simple.generateHudCacheData(playerIDs, base, category, actionTypes
|
||||||
, allIns, actionTypeByNo, winnings, totalWinnings, None
|
, allIns, actionTypeByNo, winnings, totalWinnings, None
|
||||||
, actionTypes, actionAmounts)
|
, actionTypes, actionAmounts, antes)
|
||||||
|
|
||||||
if isTourney:
|
if isTourney:
|
||||||
ranks=[]
|
ranks=[]
|
||||||
|
@ -185,7 +185,7 @@ def mainParser(backend, db, cursor, site, category, hand):
|
||||||
, seatNos)
|
, seatNos)
|
||||||
else:
|
else:
|
||||||
raise fpdb_simple.FpdbError ("unrecognised category")
|
raise fpdb_simple.FpdbError ("unrecognised category")
|
||||||
db.commit()
|
db.commit()
|
||||||
return result
|
return result
|
||||||
#end def mainParser
|
#end def mainParser
|
||||||
|
|
||||||
|
|
|
@ -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
|
#end def store_hands_players_stud_tourney
|
||||||
|
|
||||||
def generateHudCacheData(player_ids, base, category, action_types, allIns, actionTypeByNo
|
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
|
"""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
|
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)
|
#print "b4 totprof calc, len(playerIds)=", len(player_ids)
|
||||||
for pl in range (len(player_ids)):
|
for pl in range (len(player_ids)):
|
||||||
#print "pl=", pl
|
#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 i in range (len(actionTypes)): #iterate through streets
|
||||||
#for j in range (len(actionTypes[i])): #iterate through names (using pl loop above)
|
#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
|
for k in range (len(actionTypes[i][pl])): #iterate through individual actions of that player on that street
|
||||||
|
|
Loading…
Reference in New Issue
Block a user