[NEWIMPORT] Minor update, use DerivedStats.getStats()

This commit is contained in:
Worros 2009-10-14 20:28:07 +08:00
parent 2350474d38
commit 7b2c1fa243
2 changed files with 7 additions and 11 deletions

View File

@ -80,11 +80,8 @@ class DerivedStats():
# commentTs DATETIME # commentTs DATETIME
def assembleHandsPlayers(self, hand): def assembleHandsPlayers(self, hand):
#self.vpip(self.hand)
#hand.players = [[seat, name, chips],[seat, name, chips]] #hand.players = [[seat, name, chips],[seat, name, chips]]
for player in hand.players: for player in hand.players:
self.handsplayers[player[1]] = {}
self.handsplayers[player[1]]['seatNo'] = player[0] self.handsplayers[player[1]]['seatNo'] = player[0]
self.handsplayers[player[1]]['startCash'] = player[2] self.handsplayers[player[1]]['startCash'] = player[2]
@ -788,14 +785,14 @@ 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:
# print "DEBUG: '%s' '%s' '%s'" %(player, player[1], vpipers)
# if player[1] in vpipers:
# self.handsplayers[player[1]]['vpip'] = True
# else:
# self.handsplayers[player[1]]['vpip'] = False
self.hands['playersVpi'] = len(vpipers) self.hands['playersVpi'] = len(vpipers)
for player in hand.players:
if player[1] in vpipers:
self.handsplayers[player[1]]['vpip'] = True
else:
self.handsplayers[player[1]]['vpip'] = False
def playersAtStreetX(self, hand): def playersAtStreetX(self, hand):
""" playersAtStreet1 SMALLINT NOT NULL, /* num of players seeing flop/street4/draw1 */""" """ playersAtStreet1 SMALLINT NOT NULL, /* num of players seeing flop/street4/draw1 */"""
# self.actions[street] is a list of all actions in a tuple, contining the player name first # self.actions[street] is a list of all actions in a tuple, contining the player name first

View File

@ -205,8 +205,7 @@ db: a connected fpdb_db object"""
#Gametypes #Gametypes
gtid = db.getGameTypeId(self.siteId, self.gametype) gtid = db.getGameTypeId(self.siteId, self.gametype)
self.stats.assembleHands(self) self.stats.getStats(self)
self.stats.assembleHandsPlayers(self)
##### #####
# End prep functions # End prep functions