From 3f0dfd2b2614ca5de2e807f71f2b3eff9703198a Mon Sep 17 00:00:00 2001 From: Worros Date: Sat, 16 Jan 2010 13:55:01 +0800 Subject: [PATCH] Fix enumerate() --- pyfpdb/DerivedStats.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pyfpdb/DerivedStats.py b/pyfpdb/DerivedStats.py index 8b9af93b..88bb6407 100644 --- a/pyfpdb/DerivedStats.py +++ b/pyfpdb/DerivedStats.py @@ -350,8 +350,9 @@ class DerivedStats(): CG: CheckCall would be a much better name for this. """ - for i, street in enumerate(hand.actionStreets[2:], start=1): - actions = hand.actions[hand.actionStreets[i]] + #for i, street in enumerate(hand.actionStreets[2:], start=1): + for i, street in enumerate(hand.actionStreets[2:]): + actions = hand.actions[hand.actionStreets[i+1]] checkers = set() initial_raiser = None for action in actions: @@ -361,8 +362,8 @@ class DerivedStats(): elif act == 'checks' and initial_raiser is None: checkers.add(pname) elif initial_raiser is not None and pname in checkers: - self.handsplayers[pname]['street%dCheckCallRaiseChance' % i] = True - self.handsplayers[pname]['street%dCheckCallRaiseDone' % i] = act!='folds' + self.handsplayers[pname]['street%dCheckCallRaiseChance' % (i+1)] = True + self.handsplayers[pname]['street%dCheckCallRaiseDone' % (i+1)] = act!='folds' def seen(self, hand, i): pas = set()