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