[NEWIMPORT] Finish up Hand import

Decided to leave streetXRaisesN alone for the moment
This commit is contained in:
Worros 2009-10-13 14:04:19 +08:00
parent e7a7229dc0
commit 1d0177f6d4
3 changed files with 22 additions and 31 deletions

View File

@ -1391,6 +1391,7 @@ class Database:
importtime,
seats,
maxseats,
texture,
playersVpi,
boardcard1,
boardcard2,
@ -1402,6 +1403,11 @@ class Database:
playersAtStreet3,
playersAtStreet4,
playersAtShowdown,
street0Raises,
street1Raises,
street2Raises,
street3Raises,
street4Raises,
street1Pot,
street2Pot,
street3Pot,
@ -1411,13 +1417,7 @@ class Database:
VALUES
(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s)"""
#--- texture,
#-- street0Raises,
#-- street1Raises,
#-- street2Raises,
#-- street3Raises,
#-- street4Raises,
%s, %s, %s, %s, %s, %s, %s, %s, %s)"""
q = q.replace('%s', self.sql.query['placeholder'])
print "DEBUG: p: %s" %p
@ -1430,6 +1430,7 @@ class Database:
datetime.today(), #importtime
p['seats'],
p['maxSeats'],
p['texture'],
p['playersVpi'],
p['boardcard1'],
p['boardcard2'],
@ -1441,11 +1442,11 @@ class Database:
p['playersAtStreet3'],
p['playersAtStreet4'],
p['playersAtShowdown'],
# hudCache['street0Raises'],
# hudCache['street1Raises'],
# hudCache['street2Raises'],
# hudCache['street3Raises'],
# hudCache['street4Raises'],
p['street0Raises'],
p['street1Raises'],
p['street2Raises'],
p['street3Raises'],
p['street4Raises'],
p['street1Pot'],
p['street2Pot'],
p['street3Pot'],

View File

@ -47,6 +47,7 @@ class DerivedStats():
self.hands['importTime'] = None
self.hands['seats'] = self.countPlayers(hand)
self.hands['maxSeats'] = hand.maxseats
self.hands['texture'] = None # No calculation done for this yet.
# This (i think...) is correct for both stud and flop games, as hand.board['street'] disappears, and
# those values remain default in stud.
@ -66,28 +67,12 @@ class DerivedStats():
self.hands['street4Pot'],
self.hands['showdownPot']) = hand.getStreetTotals()
self.vpip(hand) # Gives playersVpi (num of players vpip)
self.playersAtStreetX(hand) # Gives playersAtStreet1..4 and Showdown
# texture smallint,
# street0Raises TINYINT NOT NULL, /* num small bets paid to see flop/street4, including blind */
# Needs to be recorded
# street1Raises TINYINT NOT NULL, /* num small bets paid to see turn/street5 */
# Needs to be recorded
# street2Raises TINYINT NOT NULL, /* num big bets paid to see river/street6 */
# Needs to be recorded
# street3Raises TINYINT NOT NULL, /* num big bets paid to see sd/street7 */
# Needs to be recorded
# street4Raises TINYINT NOT NULL, /* num big bets paid to see showdown */
# Needs to be recorded
# comment TEXT,
# commentTs DATETIME
def assembleHandsPlayers(self, hand):
self.vpip(self.hand)
for i, street in enumerate(hand.actionStreets[1:]):
@ -145,7 +130,12 @@ class DerivedStats():
# [ (player, action, ....), (player2, action, ...) ]
# No idea what this value is actually supposed to be
# In theory its "num small bets paid to see flop/street4, including blind" which makes sense for limit. Not so useful for nl
pass
# Leaving empty for the moment,
self.hands['street0Raises'] = 0 # /* num small bets paid to see flop/street4, including blind */
self.hands['street1Raises'] = 0 # /* num small bets paid to see turn/street5 */
self.hands['street2Raises'] = 0 # /* num big bets paid to see river/street6 */
self.hands['street3Raises'] = 0 # /* num big bets paid to see sd/street7 */
self.hands['street4Raises'] = 0 # /* num big bets paid to see showdown */
def aggr(self, hand, i):
aggrers = set()

0
pyfpdb/fpdb.py Normal file → Executable file
View File