From 81c731b42ed54de9a665adfbcedfd979a39d085a Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 15 Apr 2010 14:51:20 +0800 Subject: [PATCH] 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 --- pyfpdb/DerivedStats.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pyfpdb/DerivedStats.py b/pyfpdb/DerivedStats.py index 327b8de2..ae581ee1 100644 --- a/pyfpdb/DerivedStats.py +++ b/pyfpdb/DerivedStats.py @@ -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