rename stealattempt fields to raisefirstin and derive accordingly
This commit is contained in:
+11
-8
@@ -53,8 +53,8 @@ class DerivedStats():
|
||||
self.handsplayers[player[1]]['street0_3BDone'] = False
|
||||
self.handsplayers[player[1]]['street0_4BChance'] = False
|
||||
self.handsplayers[player[1]]['street0_4BDone'] = False
|
||||
self.handsplayers[player[1]]['stealAttemptChance'] = False
|
||||
self.handsplayers[player[1]]['stealAttempted'] = False
|
||||
self.handsplayers[player[1]]['raiseFirstInChance'] = False
|
||||
self.handsplayers[player[1]]['raisedFirstIn'] = False
|
||||
self.handsplayers[player[1]]['foldBbToStealChance'] = False
|
||||
self.handsplayers[player[1]]['foldSbToStealChance'] = False
|
||||
self.handsplayers[player[1]]['foldedSbToSteal'] = False
|
||||
@@ -315,13 +315,14 @@ class DerivedStats():
|
||||
self.hands['street%dRaises' % i] = len(filter( lambda action: action[1] in ('raises','bets'), hand.actions[street]))
|
||||
|
||||
def calcSteals(self, hand):
|
||||
"""Fills stealAttempt(Chance|ed, fold(Bb|Sb)ToSteal(Chance|)
|
||||
"""Fills raiseFirstInChance|raisedFirstIn, fold(Bb|Sb)ToSteal(Chance|)
|
||||
|
||||
Steal attempt - open raise on positions 1 0 S - i.e. MP3, CO, BU, SB
|
||||
Steal attempt - open raise on positions 1 0 S - i.e. CO, BU, SB
|
||||
(note: I don't think PT2 counts SB steals in HU hands, maybe we shouldn't?)
|
||||
Fold to steal - folding blind after steal attemp wo any other callers or raisers
|
||||
"""
|
||||
steal_attempt = False
|
||||
raised = False
|
||||
steal_positions = (1, 0, 'S')
|
||||
if hand.gametype['base'] == 'stud':
|
||||
steal_positions = (2, 1, 0)
|
||||
@@ -341,11 +342,13 @@ class DerivedStats():
|
||||
if steal_attempt and act != 'folds':
|
||||
break
|
||||
|
||||
if posn in steal_positions and not steal_attempt:
|
||||
self.handsplayers[pname]['stealAttemptChance'] = True
|
||||
if not steal_attempt and not raised: # if posn in steal_positions and not steal_attempt:
|
||||
self.handsplayers[pname]['raiseFirstInChance'] = True
|
||||
if act in ('bets', 'raises'):
|
||||
self.handsplayers[pname]['stealAttempted'] = True
|
||||
steal_attempt = True
|
||||
self.handsplayers[pname]['raisedFirstIn'] = True
|
||||
raised = True
|
||||
if posn in steal_positions:
|
||||
steal_attempt = True
|
||||
if act == 'calls':
|
||||
break
|
||||
|
||||
|
||||
Reference in New Issue
Block a user