fpdb_parse_logic: fix possible breakage i might've made to tournament parse

fpdb_simple: more usage of 'any' operator where appropriate
This commit is contained in:
eblade 2009-03-19 03:30:44 -04:00
parent e4ac034774
commit 375e0ed7c9
2 changed files with 11 additions and 16 deletions

View File

@ -141,8 +141,7 @@ def mainParser(backend, db, cursor, site, category, hand, config):
, actionTypes, actionAmounts, antes)
if isTourney:
ranks = []
map(lambda x: 0, names) # create an array of 0's equal to the length of names
ranks = map(lambda x: 0, names) # create an array of 0's equal to the length of names
payin_amounts = fpdb_simple.calcPayin(len(names), buyin, fee)
if base == "hold":

View File

@ -1864,8 +1864,7 @@ sure to also change the following storage method and table_viewer.prepare_data i
#flop stuff
street=1
if myStreet1Seen:
for count in xrange(len(action_types[street][player])):
if action_types[street][player][count]=="bet":
if any(actiontype == "bet" for actiontype in action_types[street][player]):
myStreet1Aggr = True
for otherPlayer in xrange(len(player_ids)):
@ -1882,8 +1881,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:
for count in xrange(len(action_types[street][player])):
if action_types[street][player][count]=="bet":
if any(actiontype == "bet" for actiontype in action_types[street][player]):
myStreet2Aggr = True
for otherPlayer in xrange(len(player_ids)):
@ -1900,8 +1898,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:
for count in xrange(len(action_types[street][player])):
if action_types[street][player][count]=="bet":
if any(actiontype == "bet" for actiontype in action_types[street][player]):
myStreet3Aggr = True
for otherPlayer in xrange(len(player_ids)):
@ -1918,8 +1915,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:
for count in xrange(len(action_types[street][player])):
if action_types[street][player][count]=="bet":
if any(actiontype == "bet" for actiontype in action_types[street][player]):
myStreet4Aggr=True
for otherPlayer in xrange(len(player_ids)):