From ccb116cedad535fc0a538a1d251529563c3d2860 Mon Sep 17 00:00:00 2001 From: Worros Date: Wed, 13 Oct 2010 18:15:14 +0800 Subject: [PATCH] DerivedStats: Fix raiseFirstInChance and raisedFirstIn for stud The previous calculation didn't correctly deal with the 'complete' and 'bringin' actions, with bringin being markes as raisedFirstIn = True Reduced regression test errors, but triggered some in unverified file. --------------------- Total Errors: 22 --------------------- Likely offenders: ( 2) : regression-test-files/cash/Stars/Stud/7-StudHL-USD-0.04-0.08-200911.Cardtest.txt ( 2) : raiseFirstInChance ( 1) : street1CBChance ( 1) : street1CBDone --- pyfpdb/DerivedStats.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyfpdb/DerivedStats.py b/pyfpdb/DerivedStats.py index abbc4234..cd63e871 100644 --- a/pyfpdb/DerivedStats.py +++ b/pyfpdb/DerivedStats.py @@ -377,9 +377,9 @@ class DerivedStats(): if steal_attempt and act != 'folds': break - if not steal_attempt and not raised: # if posn in steal_positions and not steal_attempt: + if not steal_attempt and not raised and not act in ('bringin'): self.handsplayers[pname]['raiseFirstInChance'] = True - if act in ('bets', 'raises'): + if act in ('bets', 'raises', 'completes'): self.handsplayers[pname]['raisedFirstIn'] = True raised = True if posn in steal_positions: @@ -387,7 +387,7 @@ class DerivedStats(): if act == 'calls': break - if posn not in steal_positions and act != 'folds': + if posn not in steal_positions and act not in ('folds', 'bringin'): break def calc34BetStreet0(self, hand):