[NEWIMPORT] Fix Hand import so it runs

Also comment out some debug
This commit is contained in:
Worros 2009-10-13 15:58:05 +08:00
parent 00a8593631
commit f4887235a0

View File

@ -68,7 +68,10 @@ class DerivedStats():
self.hands['showdownPot']) = hand.getStreetTotals() self.hands['showdownPot']) = hand.getStreetTotals()
self.vpip(hand) # Gives playersVpi (num of players vpip) self.vpip(hand) # Gives playersVpi (num of players vpip)
#print "DEBUG: vpip: %s" %(self.hands['playersVpi'])
self.playersAtStreetX(hand) # Gives playersAtStreet1..4 and Showdown self.playersAtStreetX(hand) # Gives playersAtStreet1..4 and Showdown
#print "DEBUG: playersAtStreet 1:'%s' 2:'%s' 3:'%s' 4:'%s'" %(self.hands['playersAtStreet1'],self.hands['playersAtStreet2'],self.hands['playersAtStreet3'],self.hands['playersAtStreet4'])
self.streetXRaises(hand) # Empty function currently
# comment TEXT, # comment TEXT,
# commentTs DATETIME # commentTs DATETIME
@ -84,11 +87,12 @@ class DerivedStats():
if act[1] in ('calls','bets', 'raises'): if act[1] in ('calls','bets', 'raises'):
vpipers.add(act[0]) vpipers.add(act[0])
for player in hand.players: #for player in hand.players:
if player[1] in vpipers: # print "DEBUG: '%s' '%s' '%s'" %(player, player[1], vpipers)
self.handsplayers[player[1]]['vpip'] = True # if player[1] in vpipers:
else: # self.handsplayers[player[1]]['vpip'] = True
self.handsplayers[player[1]]['vpip'] = False # else:
# self.handsplayers[player[1]]['vpip'] = False
self.hands['playersVpi'] = len(vpipers) self.hands['playersVpi'] = len(vpipers)
def playersAtStreetX(self, hand): def playersAtStreetX(self, hand):
@ -105,7 +109,7 @@ class DerivedStats():
for street in hand.actionStreets: for street in hand.actionStreets:
actors = {} actors = {}
for act in a[street]: for act in hand.actions[street]:
actors[act[0]] = 1 actors[act[0]] = 1
#print "len(actors.keys(%s)): %s" % ( street, len(actors.keys())) #print "len(actors.keys(%s)): %s" % ( street, len(actors.keys()))
if hand.gametype['base'] in ("hold"): if hand.gametype['base'] in ("hold"):