Fix for CBet stat

Patch from bbtgaf@googlemail.com aka gimick

DerivedStats.betStreet() was only functioning if the player was the first person to act on a street.

If the player was checked to the function would exit as False before ever finding the player
This commit is contained in:
Worros 2010-04-15 14:51:20 +08:00
parent fb6af1fe75
commit 81c731b42e

View File

@ -505,9 +505,13 @@ class DerivedStats():
"""Returns true if player bet/raised the street as their first action"""
betOrRaise = False
for act in self.hand.actions[street]:
if act[0] == player and act[1] in ('bets', 'raises'):
betOrRaise = True
else:
if act[0] == player:
if act[1] in ('bets', 'raises'):
betOrRaise = True
else:
# player found but did not bet or raise as their first action
break
#else:
# haven't found player's first action yet
return betOrRaise