generateHudCacheData: fix the code for identifying cutoff, button, sb, bb

This commit is contained in:
eblade 2009-03-18 23:27:15 -04:00
parent 4830b72121
commit f823db4eef

View File

@ -1712,19 +1712,20 @@ sure to also change the following storage method and table_viewer.prepare_data i
firstPfRaiserNo=-1 firstPfRaiserNo=-1
firstPfCallByNo=-1 firstPfCallByNo=-1
firstPfCallerId=-1 firstPfCallerId=-1
for i in xrange(len(actionTypeByNo[0])):
if actionTypeByNo[0][i][1]=="bet": for i, action in enumerate(actionTypeByNo[0]):
if action[1] == "bet":
firstPfRaiseByNo = i firstPfRaiseByNo = i
firstPfRaiserId=actionTypeByNo[0][i][0] firstPfRaiserId = action[0]
for j in xrange(len(player_ids)): for j, pid in enumerate(player_ids):
if player_ids[j]==firstPfRaiserId: if pid == firstPfRaiserId:
firstPfRaiserNo = j firstPfRaiserNo = j
break break
break break
for i in xrange(len(actionTypeByNo[0])): for i, action in enumerate(actionTypeByNo[0]):
if actionTypeByNo[0][i][1]=="call": if action[1] == "call":
firstPfCallByNo = i firstPfCallByNo = i
firstPfCallerId=actionTypeByNo[0][i][0] firstPfCallerId = action[0]
break break
cutoffId=-1 cutoffId=-1
@ -1732,14 +1733,14 @@ sure to also change the following storage method and table_viewer.prepare_data i
sbId=-1 sbId=-1
bbId=-1 bbId=-1
if base=="hold": if base=="hold":
for player in xrange(len(positions)): for player, pos in enumerate(positions):
if positions==1: if pos == 1:
cutoffId = player_ids[player] cutoffId = player_ids[player]
if positions==0: if pos == 0:
buttonId = player_ids[player] buttonId = player_ids[player]
if positions=='S': if pos == 'S':
sbId = player_ids[player] sbId = player_ids[player]
if positions=='B': if pos == 'B':
bbId = player_ids[player] bbId = player_ids[player]
someoneStole=False someoneStole=False