slight optimizations
This commit is contained in:
parent
3248cb60f2
commit
adadb7defa
|
@ -1241,40 +1241,34 @@ sure to also change the following storage method and table_viewer.prepare_data i
|
|||
|
||||
|
||||
#calculate saw* values
|
||||
isAllIn = False
|
||||
if any(i for i in allIns[0][player]):
|
||||
isAllIn = True
|
||||
isAllIn = any(i for i in AllIns[0][player])
|
||||
if isAllIn or len(action_types[1][player]) > 0:
|
||||
myStreet1Seen = True
|
||||
|
||||
if any(i for i in allIns[1][player]):
|
||||
isAllIn = True
|
||||
if isAllIn or len(action_types[2][player]) > 0:
|
||||
if not isAllIn:
|
||||
isAllIn = any(i for i in allins[1][player])
|
||||
elif len(action_types[2][player]) > 0:
|
||||
if all(actiontype != "fold" for actiontype in action_types[1][player]):
|
||||
myStreet2Seen = True
|
||||
|
||||
if any(i for i in allIns[2][player]):
|
||||
isAllIn = True
|
||||
if isAllIn or len(action_types[3][player]) > 0:
|
||||
if not isAllIn:
|
||||
isAllAin = any(i for i in allIns[2][player])
|
||||
elif len(action_types[3][player]) > 0:
|
||||
if all(actiontype != "fold" for actiontype in action_types[2][player]):
|
||||
myStreet3Seen = True
|
||||
|
||||
#print "base:", base
|
||||
if base == "hold":
|
||||
mySawShowdown = True
|
||||
if any(actiontype == "fold" for actiontype in action_types[3][player]):
|
||||
mySawShowdown = False
|
||||
mySawShowdown = not any(actiontype == "fold" for actiontype in action_types[3][player])
|
||||
else:
|
||||
#print "in else"
|
||||
if any(i for i in allIns[3][player]):
|
||||
isAllIn = True
|
||||
if isAllIn or len(action_types[4][player]) > 0:
|
||||
if not isAllIn:
|
||||
isAllIn = any(i for i in allins[3][player])
|
||||
elif len(action_types[4][player]) > 0:
|
||||
#print "in if"
|
||||
myStreet4Seen = True
|
||||
|
||||
mySawShowdown = True
|
||||
if any(actiontype == "fold" for actiontype in action_types[4][player]):
|
||||
mySawShowdown = False
|
||||
mySawShowdown = not any(actiontype == "fold" for actiontype in action_types[4][player])
|
||||
|
||||
if myStreet1Seen:
|
||||
result['playersAtStreet1'] += 1
|
||||
|
@ -1290,9 +1284,7 @@ sure to also change the following storage method and table_viewer.prepare_data i
|
|||
#flop stuff
|
||||
street = 1
|
||||
if myStreet1Seen:
|
||||
if any(actiontype == "bet" for actiontype in action_types[street][player]):
|
||||
myStreet1Aggr = True
|
||||
|
||||
myStreet1Aggr = any(actiontype == "bet" for actiontype in action_types[street][player])
|
||||
myStreet1Calls = action_types[street][player].count('call')
|
||||
myStreet1Bets = action_types[street][player].count('bet')
|
||||
# street1Raises = action_types[street][player].count('raise') bet count includes raises for now
|
||||
|
@ -1312,9 +1304,7 @@ sure to also change the following storage method and table_viewer.prepare_data i
|
|||
#turn stuff - copy of flop with different vars
|
||||
street = 2
|
||||
if myStreet2Seen:
|
||||
if any(actiontype == "bet" for actiontype in action_types[street][player]):
|
||||
myStreet2Aggr = True
|
||||
|
||||
myStreet2Aggr = any(actiontype == "bet" for actiontype in action_types[street][player])
|
||||
myStreet2Calls = action_types[street][player].count('call')
|
||||
myStreet2Bets = action_types[street][player].count('bet')
|
||||
# street2Raises = action_types[street][player].count('raise') bet count includes raises for now
|
||||
|
@ -1334,9 +1324,7 @@ sure to also change the following storage method and table_viewer.prepare_data i
|
|||
#river stuff - copy of flop with different vars
|
||||
street = 3
|
||||
if myStreet3Seen:
|
||||
if any(actiontype == "bet" for actiontype in action_types[street][player]):
|
||||
myStreet3Aggr = True
|
||||
|
||||
myStreet3Aggr = any(actiontype == "bet" for actiontype in action_types[street][player])
|
||||
myStreet3Calls = action_types[street][player].count('call')
|
||||
myStreet3Bets = action_types[street][player].count('bet')
|
||||
# street3Raises = action_types[street][player].count('raise') bet count includes raises for now
|
||||
|
@ -1356,9 +1344,7 @@ sure to also change the following storage method and table_viewer.prepare_data i
|
|||
#stud river stuff - copy of flop with different vars
|
||||
street = 4
|
||||
if myStreet4Seen:
|
||||
if any(actiontype == "bet" for actiontype in action_types[street][player]):
|
||||
myStreet4Aggr=True
|
||||
|
||||
myStreet4Aggr = any(actiontype == "bet" for actiontype in action_types[street][player])
|
||||
myStreet4Calls = action_types[street][player].count('call')
|
||||
myStreet4Bets = action_types[street][player].count('bet')
|
||||
# street4Raises = action_types[street][player].count('raise') bet count includes raises for now
|
||||
|
|
Loading…
Reference in New Issue
Block a user