From 16d1f43c7e34c7be3e0452a8ae82b36ddd728ce3 Mon Sep 17 00:00:00 2001 From: Worros Date: Wed, 14 Oct 2009 23:55:51 +0800 Subject: [PATCH] [NEWIMPORT] HandsPlayers.streetXAggr insert. --- pyfpdb/Database.py | 20 +++++++++++++------- pyfpdb/DerivedStats.py | 2 ++ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index e80c4694..d25b309c 100755 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -1431,16 +1431,27 @@ class Database: inserts.append( (hid, pids[p], pdata[p]['startCash'], - pdata[p]['seatNo'] + pdata[p]['seatNo'], + pdata[p]['street0Aggr'], + pdata[p]['street1Aggr'], + pdata[p]['street2Aggr'], + pdata[p]['street3Aggr'], + pdata[p]['street4Aggr'] ) ) q = """INSERT INTO HandsPlayers ( handId, playerId, startCash, - seatNo + seatNo, + street0Aggr, + street1Aggr, + street2Aggr, + street3Aggr, + street4Aggr ) VALUES ( + %s, %s, %s, %s, %s, %s, %s, %s, %s )""" @@ -1455,7 +1466,6 @@ class Database: # rake, # totalProfit, # street0VPI, -# street0Aggr, # street0_3BChance, # street0_3BDone, # street1Seen, @@ -1463,10 +1473,6 @@ class Database: # street3Seen, # street4Seen, # sawShowdown, -# street1Aggr, -# street2Aggr, -# street3Aggr, -# street4Aggr, # otherRaisedStreet1, # otherRaisedStreet2, # otherRaisedStreet3, diff --git a/pyfpdb/DerivedStats.py b/pyfpdb/DerivedStats.py index 5f0d2aff..5b69bbfb 100644 --- a/pyfpdb/DerivedStats.py +++ b/pyfpdb/DerivedStats.py @@ -29,6 +29,8 @@ class DerivedStats(): for player in hand.players: self.handsplayers[player[1]] = {} + #Init vars that may not be used, but still need to be inserted. + self.handsplayers[player[1]]['street4Aggr'] = False self.assembleHands(self.hand) self.assembleHandsPlayers(self.hand)