Merge branch 'carl'

This commit is contained in:
Steffen Schaumburg 2010-12-23 23:07:55 +01:00
commit b549feab03
15 changed files with 767 additions and 170 deletions

View File

@ -1,3 +1,9 @@
free-poker-tools (0.21~rc1) unstable; urgency=low
* First 0.21 release candidate
-- Mika Bostrom <bostik@iki.fi> Mon, 06 Dec 2010 17:30:54 +0200
free-poker-tools (0.20.906-1) unstable; urgency=low free-poker-tools (0.20.906-1) unstable; urgency=low
* New snapshot * New snapshot

View File

@ -11,9 +11,8 @@ Section: games
Priority: extra Priority: extra
Depends: ${python:Depends}, python-gtk2, python-matplotlib, Depends: ${python:Depends}, python-gtk2, python-matplotlib,
python-support, python-xlib, python-support, python-xlib,
mysql-server | postgresql | python-pysqlite2, python-pysqlite2
python-psycopg2 | python-mysqldb Suggests: wine, postgresql | mysql-server, python-psycopg2 | python-mysqldb
Suggests: wine
Description: free poker database with HUD Description: free poker database with HUD
FPDB is a statistics tool for online poker. It supports most sites FPDB is a statistics tool for online poker. It supports most sites
and several games. Most prominent feature is its heads-up display and several games. Most prominent feature is its heads-up display

View File

@ -60,11 +60,14 @@ import Configuration
# Other library modules # Other library modules
try: try:
import sqlalchemy.pool as pool import sqlalchemy.pool as pool
use_pool = True #use_pool = True
# Forcing to False so we can use connection.row_factory
use_pool = False
except ImportError: except ImportError:
log.info(_("Not using sqlalchemy connection pool.")) log.info(_("Not using sqlalchemy connection pool."))
use_pool = False use_pool = False
try: try:
from numpy import var from numpy import var
use_numpy = True use_numpy = True
@ -447,6 +450,7 @@ class Database:
log.info(_("Connecting to SQLite: %(database)s") % {'database':self.db_path}) log.info(_("Connecting to SQLite: %(database)s") % {'database':self.db_path})
if os.path.exists(database) or create: if os.path.exists(database) or create:
self.connection = sqlite3.connect(self.db_path, detect_types=sqlite3.PARSE_DECLTYPES) self.connection = sqlite3.connect(self.db_path, detect_types=sqlite3.PARSE_DECLTYPES)
self.connection.row_factory = sqlite3.Row
self.__connected = True self.__connected = True
sqlite3.register_converter("bool", lambda x: bool(int(x))) sqlite3.register_converter("bool", lambda x: bool(int(x)))
sqlite3.register_adapter(bool, lambda x: "1" if x else "0") sqlite3.register_adapter(bool, lambda x: "1" if x else "0")
@ -1699,6 +1703,10 @@ class Database:
pp = pprint.PrettyPrinter(indent=4) pp = pprint.PrettyPrinter(indent=4)
pp.pprint(p) pp.pprint(p)
print _("###### End Hands ########") print _("###### End Hands ########")
# Tablename can have odd charachers
p['tableName'] = Charset.to_db_utf8(p['tableName'])
#stores into table hands: #stores into table hands:
q = self.sql.query['store_hand'] q = self.sql.query['store_hand']
@ -2090,7 +2098,7 @@ class Database:
if (game['type']=='ring'): line[0] = 1 # count ring hands if (game['type']=='ring'): line[0] = 1 # count ring hands
if (game['type']=='tour'): line[1] = 1 # count tour hands if (game['type']=='tour'): line[1] = 1 # count tour hands
if (game['type']=='ring'): line[2] = pdata[p]['totalProfit'] #sum of profit if (game['type']=='ring'): line[2] = pdata[p]['totalProfit'] #sum of profit
if (game['type']=='ring'): line[3] = float(Decimal(pdata[p]['totalProfit'])/Decimal(bigBet)) #sum of big bets won if (game['type']=='ring'): line[3] = 0 #float(Decimal(pdata[p]['totalProfit'])/Decimal(bigBet)) #sum of big bets won
line[4] = startTime line[4] = startTime
inserts.append(line) inserts.append(line)

View File

@ -37,7 +37,8 @@ class Fulltilt(HandHistoryConverter):
substitutions = { substitutions = {
'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes 'LEGAL_ISO' : "USD|EUR|GBP|CAD|FPP", # legal ISO currency codes
'LS' : u"\$|\u20AC|\xe2\x82\xac|", # legal currency symbols - Euro(cp1252, utf-8) 'LS' : u"\$|\u20AC|\xe2\x82\xac|", # legal currency symbols - Euro(cp1252, utf-8)
'TAB' : u"-\u2013\s\da-zA-Z" 'TAB' : u"-\u2013'\s\da-zA-Z", # legal characters for tablename
'NUM' : u".,\d", # legal characters in number format
} }
# Static regexes # Static regexes
@ -45,10 +46,10 @@ class Fulltilt(HandHistoryConverter):
(?:(?P<TOURNAMENT>.+)\s\((?P<TOURNO>\d+)\),\s)? (?:(?P<TOURNAMENT>.+)\s\((?P<TOURNO>\d+)\),\s)?
.+ .+
-\s(?P<CURRENCY>[%(LS)s]|)? -\s(?P<CURRENCY>[%(LS)s]|)?
(?P<SB>[.0-9]+)/ (?P<SB>[%(NUM)s]+)/
[%(LS)s]?(?P<BB>[.0-9]+)\s [%(LS)s]?(?P<BB>[%(NUM)s]+)\s
(Ante\s\$?(?P<ANTE>[.0-9]+)\s)?-\s (Ante\s\$?(?P<ANTE>[%(NUM)s]+)\s)?-\s
[%(LS)s]?(?P<CAP>[.0-9]+\sCap\s)? [%(LS)s]?(?P<CAP>[%(NUM)s]+\sCap\s)?
(?P<LIMIT>(No\sLimit|Pot\sLimit|Limit))?\s (?P<LIMIT>(No\sLimit|Pot\sLimit|Limit))?\s
(?P<GAME>(Hold\'em|Omaha\sHi|Omaha\sH/L|7\sCard\sStud|Stud\sH/L|Razz|Stud\sHi|2-7\sTriple\sDraw|5\sCard\sDraw|Badugi)) (?P<GAME>(Hold\'em|Omaha\sHi|Omaha\sH/L|7\sCard\sStud|Stud\sH/L|Razz|Stud\sHi|2-7\sTriple\sDraw|5\sCard\sDraw|Badugi))
''' % substitutions, re.VERBOSE) ''' % substitutions, re.VERBOSE)
@ -60,7 +61,7 @@ class Fulltilt(HandHistoryConverter):
(?P<PLAY>Play\sChip\s|PC)? (?P<PLAY>Play\sChip\s|PC)?
(?P<TABLE>[%(TAB)s]+)\s (?P<TABLE>[%(TAB)s]+)\s
(\((?P<TABLEATTRIBUTES>.+)\)\s)?-\s (\((?P<TABLEATTRIBUTES>.+)\)\s)?-\s
[%(LS)s]?(?P<SB>[.0-9]+)/[%(LS)s]?(?P<BB>[.0-9]+)\s(Ante\s[%(LS)s]?(?P<ANTE>[.0-9]+)\s)?-\s [%(LS)s]?(?P<SB>[%(NUM)s]+)/[%(LS)s]?(?P<BB>[%(NUM)s]+)\s(Ante\s[%(LS)s]?(?P<ANTE>[.0-9]+)\s)?-\s
[%(LS)s]?(?P<CAP>[.0-9]+\sCap\s)? [%(LS)s]?(?P<CAP>[.0-9]+\sCap\s)?
(?P<GAMETYPE>[-\da-zA-Z\/\'\s]+)\s-\s (?P<GAMETYPE>[-\da-zA-Z\/\'\s]+)\s-\s
(?P<DATETIME>.*$) (?P<DATETIME>.*$)
@ -140,16 +141,16 @@ class Fulltilt(HandHistoryConverter):
self.substitutions['PLAYERS'] = player_re self.substitutions['PLAYERS'] = player_re
logging.debug("player_re: " + player_re) logging.debug("player_re: " + player_re)
self.re_PostSB = re.compile(r"^%(PLAYERS)s posts the small blind of [%(LS)s]?(?P<SB>[.0-9]+)" % self.substitutions, re.MULTILINE) self.re_PostSB = re.compile(r"^%(PLAYERS)s posts the small blind of [%(LS)s]?(?P<SB>[%(NUM)s]+)" % self.substitutions, re.MULTILINE)
self.re_PostDead = re.compile(r"^%(PLAYERS)s posts a dead small blind of [%(LS)s]?(?P<SB>[.0-9]+)" % self.substitutions, re.MULTILINE) self.re_PostDead = re.compile(r"^%(PLAYERS)s posts a dead small blind of [%(LS)s]?(?P<SB>[%(NUM)s]+)" % self.substitutions, re.MULTILINE)
self.re_PostBB = re.compile(r"^%(PLAYERS)s posts (the big blind of )?[%(LS)s]?(?P<BB>[.0-9]+)" % self.substitutions, re.MULTILINE) self.re_PostBB = re.compile(r"^%(PLAYERS)s posts (the big blind of )?[%(LS)s]?(?P<BB>[%(NUM)s]+)" % self.substitutions, re.MULTILINE)
self.re_Antes = re.compile(r"^%(PLAYERS)s antes [%(LS)s]?(?P<ANTE>[.0-9]+)" % self.substitutions, re.MULTILINE) self.re_Antes = re.compile(r"^%(PLAYERS)s antes [%(LS)s]?(?P<ANTE>[%(NUM)s]+)" % self.substitutions, re.MULTILINE)
self.re_BringIn = re.compile(r"^%(PLAYERS)s brings in for [%(LS)s]?(?P<BRINGIN>[.0-9]+)" % self.substitutions, re.MULTILINE) self.re_BringIn = re.compile(r"^%(PLAYERS)s brings in for [%(LS)s]?(?P<BRINGIN>[%(NUM)s]+)" % self.substitutions, re.MULTILINE)
self.re_PostBoth = re.compile(r"^%(PLAYERS)s posts small \& big blinds \[[%(LS)s]? (?P<SBBB>[.0-9]+)" % self.substitutions, re.MULTILINE) self.re_PostBoth = re.compile(r"^%(PLAYERS)s posts small \& big blinds \[[%(LS)s]? (?P<SBBB>[%(NUM)s]+)" % self.substitutions, re.MULTILINE)
self.re_HeroCards = re.compile(r"^Dealt to %s(?: \[(?P<OLDCARDS>.+?)\])?( \[(?P<NEWCARDS>.+?)\])" % player_re, re.MULTILINE) self.re_HeroCards = re.compile(r"^Dealt to %s(?: \[(?P<OLDCARDS>.+?)\])?( \[(?P<NEWCARDS>.+?)\])" % player_re, re.MULTILINE)
self.re_Action = re.compile(r"^%(PLAYERS)s(?P<ATYPE> bets| checks| raises to| completes it to| calls| folds)( [%(LS)s]?(?P<BET>[.,\d]+))?" % self.substitutions, re.MULTILINE) self.re_Action = re.compile(r"^%(PLAYERS)s(?P<ATYPE> bets| checks| raises to| completes it to| calls| folds)( [%(LS)s]?(?P<BET>[%(NUM)s]+))?" % self.substitutions, re.MULTILINE)
self.re_ShowdownAction = re.compile(r"^%s shows \[(?P<CARDS>.*)\]" % player_re, re.MULTILINE) self.re_ShowdownAction = re.compile(r"^%s shows \[(?P<CARDS>.*)\]" % player_re, re.MULTILINE)
self.re_CollectPot = re.compile(r"^Seat (?P<SEAT>[0-9]+): %(PLAYERS)s (\(button\) |\(small blind\) |\(big blind\) )?(collected|showed \[.*\] and won) \([%(LS)s]?(?P<POT>[.,\d]+)\)(, mucked| with.*)" % self.substitutions, re.MULTILINE) self.re_CollectPot = re.compile(r"^Seat (?P<SEAT>[0-9]+): %(PLAYERS)s (\(button\) |\(small blind\) |\(big blind\) )?(collected|showed \[.*\] and won) \([%(LS)s]?(?P<POT>[%(NUM)s]+)\)(, mucked| with.*)" % self.substitutions, re.MULTILINE)
self.re_SitsOut = re.compile(r"^%s sits out" % player_re, re.MULTILINE) self.re_SitsOut = re.compile(r"^%s sits out" % player_re, re.MULTILINE)
self.re_ShownCards = re.compile(r"^Seat (?P<SEAT>[0-9]+): %s (\(button\) |\(small blind\) |\(big blind\) )?(?P<ACT>showed|mucked) \[(?P<CARDS>.*)\].*" % player_re, re.MULTILINE) self.re_ShownCards = re.compile(r"^Seat (?P<SEAT>[0-9]+): %s (\(button\) |\(small blind\) |\(big blind\) )?(?P<ACT>showed|mucked) \[(?P<CARDS>.*)\].*" % player_re, re.MULTILINE)
@ -206,8 +207,8 @@ class Fulltilt(HandHistoryConverter):
info['limitType'] = 'cn' info['limitType'] = 'cn'
else: else:
info['limitType'] = limits[mg['LIMIT']] info['limitType'] = limits[mg['LIMIT']]
info['sb'] = mg['SB'] info['sb'] = self.clearMoneyString(mg['SB'])
info['bb'] = mg['BB'] info['bb'] = self.clearMoneyString(mg['BB'])
if mg['GAME'] is not None: if mg['GAME'] is not None:
(info['base'], info['category']) = games[mg['GAME']] (info['base'], info['category']) = games[mg['GAME']]
if mg['CURRENCY'] is not None: if mg['CURRENCY'] is not None:
@ -339,15 +340,15 @@ class Fulltilt(HandHistoryConverter):
def readBlinds(self, hand): def readBlinds(self, hand):
try: try:
m = self.re_PostSB.search(hand.handText) m = self.re_PostSB.search(hand.handText)
hand.addBlind(m.group('PNAME'), 'small blind', m.group('SB')) hand.addBlind(m.group('PNAME'), 'small blind', self.clearMoneyString(m.group('SB')))
except: # no small blind except: # no small blind
hand.addBlind(None, None, None) hand.addBlind(None, None, None)
for a in self.re_PostDead.finditer(hand.handText): for a in self.re_PostDead.finditer(hand.handText):
hand.addBlind(a.group('PNAME'), 'secondsb', a.group('SB')) hand.addBlind(a.group('PNAME'), 'secondsb', self.clearMoneyString(a.group('SB')))
for a in self.re_PostBB.finditer(hand.handText): for a in self.re_PostBB.finditer(hand.handText):
hand.addBlind(a.group('PNAME'), 'big blind', a.group('BB')) hand.addBlind(a.group('PNAME'), 'big blind', self.clearMoneyString(a.group('BB')))
for a in self.re_PostBoth.finditer(hand.handText): for a in self.re_PostBoth.finditer(hand.handText):
hand.addBlind(a.group('PNAME'), 'small & big blinds', a.group('SBBB')) hand.addBlind(a.group('PNAME'), 'small & big blinds', self.clearMoneyString(a.group('SBBB')))
def readAntes(self, hand): def readAntes(self, hand):
logging.debug(_("reading antes")) logging.debug(_("reading antes"))
@ -528,10 +529,10 @@ class Fulltilt(HandHistoryConverter):
# Additional info can be stored in the tourney object # Additional info can be stored in the tourney object
if mg['BUYIN'] is not None: if mg['BUYIN'] is not None:
tourney.buyin = 100*Decimal(re.sub(u',', u'', "%s" % mg['BUYIN'])) tourney.buyin = 100*Decimal(self.clearMoneyString(mg['BUYIN']))
tourney.fee = 0 tourney.fee = 0
if mg['FEE'] is not None: if mg['FEE'] is not None:
tourney.fee = 100*Decimal(re.sub(u',', u'', "%s" % mg['FEE'])) tourney.fee = 100*Decimal(self.clearMoneyString(mg['FEE']))
if mg['TOURNAMENT_NAME'] is not None: if mg['TOURNAMENT_NAME'] is not None:
# Tournament Name can have a trailing space at the end (depending on the tournament description) # Tournament Name can have a trailing space at the end (depending on the tournament description)
tourney.tourneyName = mg['TOURNAMENT_NAME'].rstrip() tourney.tourneyName = mg['TOURNAMENT_NAME'].rstrip()
@ -575,25 +576,25 @@ class Fulltilt(HandHistoryConverter):
mg = m.groupdict() mg = m.groupdict()
if tourney.isMatrix : if tourney.isMatrix :
if mg['BUYIN'] is not None: if mg['BUYIN'] is not None:
tourney.subTourneyBuyin = 100*Decimal(re.sub(u',', u'', "%s" % mg['BUYIN'])) tourney.subTourneyBuyin = 100*Decimal(self.clearMoneyString(mg['BUYIN']))
tourney.subTourneyFee = 0 tourney.subTourneyFee = 0
if mg['FEE'] is not None: if mg['FEE'] is not None:
tourney.subTourneyFee = 100*Decimal(re.sub(u',', u'', "%s" % mg['FEE'])) tourney.subTourneyFee = 100*Decimal(self.clearMoneyString(mg['FEE']))
else : else :
if mg['BUYIN'] is not None: if mg['BUYIN'] is not None:
if tourney.buyin is None: if tourney.buyin is None:
tourney.buyin = 100*Decimal(re.sub(u',', u'', "%s" % mg['BUYIN'])) tourney.buyin = 100*Decimal(clearMoneyString(mg['BUYIN']))
else : else :
if 100*Decimal(re.sub(u',', u'', "%s" % mg['BUYIN'])) != tourney.buyin: if 100*Decimal(clearMoneyString(mg['BUYIN'])) != tourney.buyin:
log.error(_("Conflict between buyins read in topline (%s) and in BuyIn field (%s)") % (tourney.buyin, 100*Decimal(re.sub(u',', u'', "%s" % mg['BUYIN']))) ) log.error(_("Conflict between buyins read in topline (%s) and in BuyIn field (%s)") % (tourney.buyin, 100*Decimal(re.sub(u',', u'', "%s" % mg['BUYIN']))) )
tourney.subTourneyBuyin = 100*Decimal(re.sub(u',', u'', "%s" % mg['BUYIN'])) tourney.subTourneyBuyin = 100*Decimal(clearMoneyString(mg['BUYIN']))
if mg['FEE'] is not None: if mg['FEE'] is not None:
if tourney.fee is None: if tourney.fee is None:
tourney.fee = 100*Decimal(re.sub(u',', u'', "%s" % mg['FEE'])) tourney.fee = 100*Decimal(clearMoneyString(mg['FEE']))
else : else :
if 100*Decimal(re.sub(u',', u'', "%s" % mg['FEE'])) != tourney.fee: if 100*Decimal(clearMoneyString(mg['FEE'])) != tourney.fee:
log.error(_("Conflict between fees read in topline (%s) and in BuyIn field (%s)") % (tourney.fee, 100*Decimal(re.sub(u',', u'', "%s" % mg['FEE']))) ) log.error(_("Conflict between fees read in topline (%s) and in BuyIn field (%s)") % (tourney.fee, 100*Decimal(clearMoneyString(mg['FEE']))) )
tourney.subTourneyFee = 100*Decimal(re.sub(u',', u'', "%s" % mg['FEE'])) tourney.subTourneyFee = 100*Decimal(clearMoneyString(mg['FEE']))
if tourney.buyin is None: if tourney.buyin is None:
log.info(_("Unable to affect a buyin to this tournament : assume it's a freeroll")) log.info(_("Unable to affect a buyin to this tournament : assume it's a freeroll"))
@ -662,10 +663,10 @@ class Fulltilt(HandHistoryConverter):
tourney.koCounts.update( { tourney.hero : Decimal(mg['COUNT_KO']) } ) tourney.koCounts.update( { tourney.hero : Decimal(mg['COUNT_KO']) } )
# Deal with money amounts # Deal with money amounts
tourney.koBounty = 100*Decimal(re.sub(u',', u'', "%s" % tourney.koBounty)) tourney.koBounty = 100*Decimal(clearMoneyString(tourney.koBounty))
tourney.prizepool = 100*Decimal(re.sub(u',', u'', "%s" % tourney.prizepool)) tourney.prizepool = 100*Decimal(clearMoneyString(tourney.prizepool))
tourney.rebuyCost = 100*Decimal(re.sub(u',', u'', "%s" % tourney.rebuyCost)) tourney.rebuyCost = 100*Decimal(clearMoneyString(tourney.rebuyCost))
tourney.addOnCost = 100*Decimal(re.sub(u',', u'', "%s" % tourney.addOnCost)) tourney.addOnCost = 100*Decimal(clearMoneyString(tourney.addOnCost))
# Calculate payin amounts and update winnings -- not possible to take into account nb of rebuys, addons or Knockouts for other players than hero on FTP # Calculate payin amounts and update winnings -- not possible to take into account nb of rebuys, addons or Knockouts for other players than hero on FTP
for p in tourney.players : for p in tourney.players :
@ -691,7 +692,7 @@ class Fulltilt(HandHistoryConverter):
rank = Decimal(a.group('RANK')) rank = Decimal(a.group('RANK'))
if a.group('WINNING') is not None: if a.group('WINNING') is not None:
winnings = 100*Decimal(re.sub(u',', u'', "%s" % a.group('WINNING'))) winnings = 100*Decimal(clearMoneyString(a.group('WINNING')))
else: else:
winnings = "0" winnings = "0"

View File

@ -31,6 +31,9 @@ import gtk
import math import math
import gobject import gobject
import pprint
pp = pprint.PrettyPrinter(indent=4)
class GuiReplayer: class GuiReplayer:
def __init__(self, config, querylist, mainwin, options = None, debug=True): def __init__(self, config, querylist, mainwin, options = None, debug=True):
@ -100,30 +103,16 @@ class GuiReplayer:
self.replayBox.pack_start(self.area) self.replayBox.pack_start(self.area)
self.MyHand = self.importhand() gobject.timeout_add(1000,self.draw_action)
self.maxseats=self.MyHand.maxseats self.MyHand = self.importhand()
self.table = Table(self.area, self.MyHand).table
if self.MyHand.gametype['currency']=="USD": #TODO: check if there are others .. if self.MyHand.gametype['currency']=="USD": #TODO: check if there are others ..
self.currency="$" self.currency="$"
elif self.MyHand.gametype['currency']=="EUR": elif self.MyHand.gametype['currency']=="EUR":
self.currency="" self.currency=""
self.table={} #create table with positions, player names, status (live/folded), stacks and chips on table
for i in range(0,self.maxseats): # radius: 200, center: 250,250
x= int (round(250+200*math.cos(2*i*math.pi/self.maxseats)))
y= int (round(250+200*math.sin(2*i*math.pi/self.maxseats)))
try:
self.table[i]={"name":self.MyHand.players[i][1],"stack":Decimal(self.MyHand.players[i][2]),"x":x,"y":y,"chips":0,"status":"live"} #save coordinates of each player
try:
self.table[i]['holecards']=self.MyHand.holecards["PREFLOP"][self.MyHand.players[i][1]][1]+' '+self.MyHand.holecards["PREFLOP"][self.MyHand.players[i][1]][2]
print "holecards: ",self.table[i]['holecards']
except:
self.table[i]['holecards']=''
except IndexError: #if seat is empty
print "seat ",i+1," out of ",self.maxseats," empty"
self.actions=[] #create list with all actions self.actions=[] #create list with all actions
if isinstance(self.MyHand, HoldemOmahaHand): if isinstance(self.MyHand, HoldemOmahaHand):
@ -133,7 +122,6 @@ class GuiReplayer:
self.action_number=0 self.action_number=0
self.action_level=0 self.action_level=0
self.pot=0 self.pot=0
gobject.timeout_add(1000,self.draw_action)
def area_expose(self, area, event): def area_expose(self, area, event):
@ -249,7 +237,7 @@ class GuiReplayer:
be replaced by a function to select a hand from the db in the not so distant future. be replaced by a function to select a hand from the db in the not so distant future.
This code has been shamelessly stolen from Carl This code has been shamelessly stolen from Carl
""" """
if True: if False:
settings = {} settings = {}
settings.update(self.conf.get_db_parameters()) settings.update(self.conf.get_db_parameters())
settings.update(self.conf.get_import_parameters()) settings.update(self.conf.get_import_parameters())
@ -276,7 +264,7 @@ class GuiReplayer:
# for the Hand.__init__ # for the Hand.__init__
####### Shift this section in Database.py for all to use ###### ####### Shift this section in Database.py for all to use ######
handid = 40 handid = 1
q = self.sql.query['get_gameinfo_from_hid'] q = self.sql.query['get_gameinfo_from_hid']
q = q.replace('%s', self.sql.query['placeholder']) q = q.replace('%s', self.sql.query['placeholder'])
@ -295,10 +283,74 @@ class GuiReplayer:
print "DEBUG: Create stud hand here" print "DEBUG: Create stud hand here"
elif gametype['base'] == 'draw': elif gametype['base'] == 'draw':
print "DEBUG: Create draw hand here" print "DEBUG: Create draw hand here"
return h
def temp(self): def temp(self):
pass pass
class Table:
def __init__(self, darea, hand):
self.darea = darea
self.hand = hand
self.players = []
#self.pixmap = gtk.gdk.Pixmap(darea, width, height, depth=-1)
# tmp var while refactoring
self.table = {}
i = 0
for seat, name, chips in hand.players:
self.players.append(Player(hand, name, chips, seat))
self.table[i] = self.players[i].get_hash()
i += 1
pp.pprint(self.table)
def draw(self):
draw_players()
draw_pot()
draw_community_cards()
class Player:
def __init__(self, hand, name, stack, seat):
self.status = 'live'
self.stack = Decimal(stack)
self.chips = 0
self.seat = seat
self.name = name
self.holecards = hand.join_holecards(name)
self.x = int (round(250+200*math.cos(2*self.seat*math.pi/hand.maxseats)))
self.y = int (round(250+200*math.sin(2*self.seat*math.pi/hand.maxseats)))
def get_hash(self):
return { 'chips': 0,
'holecards': self.holecards,
'name': self.name,
'stack': self.stack,
'status': self.status,
'x': self.x,
'y': self.y,
}
def draw(self):
draw_name()
draw_stack()
draw_cards()
class Pot:
def __init__(self, hand):
self.total = 0.0
def draw(self):
pass
class CommunityCards:
def __init__(self, hand):
self.pixbuf = self.gen_pixbuf_from_file(PATH_TO_THE_FILE)
def draw(self):
pass
def main(argv=None): def main(argv=None):
"""main can also be called in the python interpreter, by supplying the command line as the argument.""" """main can also be called in the python interpreter, by supplying the command line as the argument."""
if argv is None: if argv is None:

View File

@ -581,6 +581,7 @@ Left-Drag to Move"
</hhcs> </hhcs>
<supported_databases> <supported_databases>
<!--<database db_name="fpdbtest" db_server="mysql" db_ip="localhost" db_user="fpdb" db_pass="fpdb"></database>-->
<database db_ip="localhost" db_name="fpdb" db_pass="fpdb" db_server="sqlite" db_user="fpdb"/> <database db_ip="localhost" db_name="fpdb" db_pass="fpdb" db_server="sqlite" db_user="fpdb"/>
</supported_databases> </supported_databases>

View File

@ -289,104 +289,131 @@ db: a connected Database object"""
hp.seatno, hp.seatno,
round(hp.winnings / 100.0,2) as winnings, round(hp.winnings / 100.0,2) as winnings,
p.name, p.name,
round(hp.startcash / 100.0,2) as chips, round(hp.startCash / 100.0,2) as chips,
hp.card1,hp.card2, hp.card1,hp.card2,hp.card3,hp.card4,
hp.position hp.position
FROM FROM
HandsPlayers as hp, HandsPlayers as hp,
Players as p Players as p
WHERE WHERE
hp.handId = %s hp.handId = %s
and p.id = hp.playerid and p.id = hp.playerId
ORDER BY
hp.seatno
""" """
q = q.replace('%s', db.sql.query['placeholder']) q = q.replace('%s', db.sql.query['placeholder'])
# PlayerStacks # PlayerStacks
c.execute(q, (handId,)) c.execute(q, (handId,))
for (seat, winnings, name, chips, card1,card2, position) in c.fetchall(): for (seat, winnings, name, chips, card1, card2, card3, card4, position) in c.fetchall():
print "DEBUG: seat: '%s'\tname: '%s'\tchips: '%s'" % (seat, name, chips) #print "DEBUG: addPlayer(%s, %s, %s)" %(seat,name,str(chips))
self.addPlayer(seat,name,str(chips)) self.addPlayer(seat,name,str(chips))
#if card1 and card2: #print "DEBUG: card1: %s" % card1
# self.addHoleCards(map(Card.valueSuitFromCard, (card1,card2)), name, dealt=True) # map() should work, but is returning integers... FIXME later
#if winnings > 0: #cardlist = map(Card.valueSuitFromCard, [card1, card2, card3, card4])
# self.addCollectPot(name, winnings) cardlist = [Card.valueSuitFromCard(card1), Card.valueSuitFromCard(card2), Card.valueSuitFromCard(card3), Card.valueSuitFromCard(card4)]
#if position == 'B': #print "DEUBG: cardlist: '%s'" % cardlist
# self.buttonpos = seat if cardlist[0] == '':
pass
elif self.gametype['category'] == 'holdem':
self.addHoleCards('PREFLOP', name, closed=cardlist[0:2], shown=False, mucked=False, dealt=True)
elif self.gametype['category'] == 'omaha':
self.addHoleCards('PREFLOP', name, closed=cardlist, shown=False, mucked=False, dealt=True)
if winnings > 0:
self.addCollectPot(name, str(winnings))
if position == 'B':
self.buttonpos = seat
# HandInfo : HID, TABLE # HandInfo
# BUTTON - why is this treated specially in Hand? q = """SELECT *
# answer: it is written out in hand histories FROM Hands
# still, I think we should record all the active seat positions in a seat_order array WHERE id = %s
#c.execute("""SELECT """
# h.sitehandno as hid, q = q.replace('%s', db.sql.query['placeholder'])
# h.tablename as table, c.execute(q, (handId,))
# h.startTime as startTime
# FROM # NOTE: This relies on row_factory = sqlite3.Row (set in connect() params)
# Hands as h # Need to find MySQL and Postgres equivalents
# WHERE h.id = %(handid)s # MySQL maybe: cursorclass=MySQLdb.cursors.DictCursor
# """, {'handid':handid}) res = c.fetchone()
#res = c.fetchone() self.tablename = res['tableName']
#h.handid = res[0] self.handid = res['siteHandNo']
#h.tablename = res[1] self.startTime = datetime.datetime.strptime(res['startTime'], "%Y-%m-%d %H:%M:%S+00:00")
#h.startTime = res[2] # automatically a datetime #res['tourneyId']
#gametypeId
#res['importTime'] # Don't really care about this
#res['seats']
self.maxseats = res['maxSeats']
#res['rush']
cards = map(Card.valueSuitFromCard, [res['boardcard1'], res['boardcard2'], res['boardcard3'], res['boardcard4'], res['boardcard5']])
#print "DEBUG: res['boardcard1']: %s" % res['boardcard1']
#print "DEBUG: cards: %s" % cards
if cards[0]:
self.setCommunityCards('FLOP', cards[0:3])
if cards[3]:
self.setCommunityCards('TURN', [cards[3]])
if cards[4]:
self.setCommunityCards('RIVER', [cards[4]])
# playersVpi | playersAtStreet1 | playersAtStreet2 | playersAtStreet3 |
# playersAtStreet4 | playersAtShowdown | street0Raises | street1Raises |
# street2Raises | street3Raises | street4Raises | street1Pot | street2Pot |
# street3Pot | street4Pot | showdownPot | comment | commentTs | texture
#cards = map(Card.valueSuitFromCard, res[11:16] ) # Actions
#if cards[0]: q = """SELECT
# h.setCommunityCards('FLOP', cards[0:3]) ha.actionNo,
#if cards[3]: p.name,
# h.setCommunityCards('TURN', [cards[3]]) ha.street,
#if cards[4]: ha.actionId,
# h.setCommunityCards('RIVER', [cards[4]]) ha.allIn,
#[Card.valueSuitFromCard(x) for x in cards] round(ha.amount / 100.0,2) as bet
FROM
HandsActions as ha,
HandsPlayers as hp,
Players as p,
Hands as h
WHERE
h.id = %s
and ha.handsPlayerId = hp.id
and hp.playerId = p.id
AND h.id = hp.handId
ORDER BY
ha.id ASC
; """
q = q.replace('%s', db.sql.query['placeholder'])
c.execute(q, (handId,))
for row in c.fetchall():
name = row['name']
street = row['street']
act = row['actionId']
# allin True/False if row['allIn'] == 0
bet = row['bet']
street = self.allStreets[int(street)+1]
#print "DEBUG: name: '%s' street: '%s' act: '%s' bet: '%s'" %(name, street, act, bet)
if act == 2: # Small Blind
print "DEBUG: addBlind(%s, 'small blind', %s" %(name, str(bet))
self.addBlind(name, 'small blind', str(bet))
elif act == 4: # Big Blind
self.addBlind(name, 'big blind', str(bet))
elif act == 6: # Call
self.addCall(street, name, str(bet))
elif act == 8: # Bet
self.addBet(street, name, str(bet))
elif act == 10: # Fold
self.addFold(street, name)
elif act == 11: # Check
self.addCheck(street, name)
else:
print "DEBUG: unknown action: '%s'" % act
self.totalPot()
# actions self.rake = self.totalpot - self.totalcollected
#c.execute("""SELECT self.writeHand()
# (ha.street,ha.actionno) as actnum,
# p.name,
# ha.street,
# ha.action,
# ha.allin,
# round(ha.amount / 100.0,2)
# FROM
# handsplayers as hp,
# handsactions as ha,
# players as p
# WHERE
# hp.handid = %(handid)s
# and ha.handsplayerid = hp.id
# and p.id = hp.playerid
# ORDER BY
# ha.street,ha.actionno
# """, {'handid':handid})
#res = c.fetchall()
#for (actnum,player, streetnum, act, allin, amount) in res:
# act=act.strip()
# street = h.allStreets[streetnum+1]
# if act==u'blind':
# h.addBlind(player, 'big blind', amount)
# # TODO: The type of blind is not recorded in the DB.
# # TODO: preflop street name anomalies in Hand
# elif act==u'fold':
# h.addFold(street,player)
# elif act==u'call':
# h.addCall(street,player,amount)
# elif act==u'bet':
# h.addBet(street,player,amount)
# elif act==u'check':
# h.addCheck(street,player)
# elif act==u'unbet':
# pass
# else:
# print act, player, streetnum, allin, amount
# # TODO : other actions
#hhc.readShowdownActions(self) #hhc.readShowdownActions(self)
#hc.readShownCards(self) #hc.readShownCards(self)
#h.totalPot()
#h.rake = h.totalpot - h.totalcollected
def addPlayer(self, seat, name, chips): def addPlayer(self, seat, name, chips):
@ -980,7 +1007,7 @@ class HoldemOmahaHand(Hand):
log.debug(self.actions['PREFLOP']) log.debug(self.actions['PREFLOP'])
for player in [x for x in self.players if x[1] in players_who_act_preflop]: for player in [x for x in self.players if x[1] in players_who_act_preflop]:
#Only print stacks of players who do something preflop #Only print stacks of players who do something preflop
print >>fh, ("Seat %s: %s ($%s in chips) " %(player[0], player[1], player[2])) print >>fh, ("Seat %s: %s ($%.2f in chips) " %(player[0], player[1], float(player[2])))
if self.actions['BLINDSANTES']: if self.actions['BLINDSANTES']:
for act in self.actions['BLINDSANTES']: for act in self.actions['BLINDSANTES']:

View File

@ -675,6 +675,11 @@ or None if we fail to get the info """
# PokerStars: WCOOP 2nd Chance 02: $1,050 NLHE - Tournament 307521826 Table 1 - Blinds $30/$60 # PokerStars: WCOOP 2nd Chance 02: $1,050 NLHE - Tournament 307521826 Table 1 - Blinds $30/$60
return "%s.+Table (\d+)" % (tournament, ) return "%s.+Table (\d+)" % (tournament, )
@staticmethod
def clearMoneyString(money):
"Renders 'numbers' like '1 200' and '2,000'"
return money.replace(' ', '').replace(',', '')
def getTableTitleRe(config, sitename, *args, **kwargs): def getTableTitleRe(config, sitename, *args, **kwargs):
"Returns string to search in windows titles for current site" "Returns string to search in windows titles for current site"
return getSiteHhc(config, sitename).getTableTitleRe(*args, **kwargs) return getSiteHhc(config, sitename).getTableTitleRe(*args, **kwargs)

View File

@ -240,8 +240,8 @@ class PartyPoker(HandHistoryConverter):
info['sb'] = "%.2f" % (sb) info['sb'] = "%.2f" % (sb)
info['currency'] = self.currencies[mg['CURRENCY']] info['currency'] = self.currencies[mg['CURRENCY']]
else: else:
info['sb'] = clearMoneyString(mg['SB']) info['sb'] = self.clearMoneyString(mg['SB'])
info['bb'] = clearMoneyString(mg['BB']) info['bb'] = self.clearMoneyString(mg['BB'])
info['currency'] = 'T$' info['currency'] = 'T$'
return info return info
@ -361,10 +361,10 @@ class PartyPoker(HandHistoryConverter):
if a.group('CASH') > '0': if a.group('CASH') > '0':
#record max known stack for use with players with unknown stack #record max known stack for use with players with unknown stack
maxKnownStack = max(a.group('CASH'),maxKnownStack) maxKnownStack = max(a.group('CASH'),maxKnownStack)
hand.addPlayer(int(a.group('SEAT')), a.group('PNAME'), clearMoneyString(a.group('CASH'))) hand.addPlayer(int(a.group('SEAT')), a.group('PNAME'), self.clearMoneyString(a.group('CASH')))
else: else:
#zero stacked players are added later #zero stacked players are added later
zeroStackPlayers.append([int(a.group('SEAT')), a.group('PNAME'), clearMoneyString(a.group('CASH'))]) zeroStackPlayers.append([int(a.group('SEAT')), a.group('PNAME'), self.clearMoneyString(a.group('CASH'))])
if hand.gametype['type'] == 'ring': if hand.gametype['type'] == 'ring':
#finds first vacant seat after an exact seat #finds first vacant seat after an exact seat
def findFirstEmptySeat(startSeat): def findFirstEmptySeat(startSeat):
@ -384,7 +384,7 @@ class PartyPoker(HandHistoryConverter):
#if a zero stacked player is just joined the table in this very hand then set his stack to maxKnownStack #if a zero stacked player is just joined the table in this very hand then set his stack to maxKnownStack
for p in zeroStackPlayers: for p in zeroStackPlayers:
if p[1] in match_JoiningPlayers: if p[1] in match_JoiningPlayers:
p[2] = clearMoneyString(maxKnownStack) p[2] = self.clearMoneyString(maxKnownStack)
hand.addPlayer(p[0],p[1],p[2]) hand.addPlayer(p[0],p[1],p[2])
seatedPlayers = list([(f[1]) for f in hand.players]) seatedPlayers = list([(f[1]) for f in hand.players])
@ -401,7 +401,7 @@ class PartyPoker(HandHistoryConverter):
occupiedSeats = list([(f[0]) for f in hand.players]) occupiedSeats = list([(f[0]) for f in hand.players])
occupiedSeats.sort() occupiedSeats.sort()
newPlayerSeat = findFirstEmptySeat(previousBBPosterSeat) newPlayerSeat = findFirstEmptySeat(previousBBPosterSeat)
hand.addPlayer(newPlayerSeat,player,clearMoneyString(maxKnownStack)) hand.addPlayer(newPlayerSeat,player,self.clearMoneyString(maxKnownStack))
def markStreets(self, hand): def markStreets(self, hand):
m = re.search( m = re.search(
@ -491,7 +491,7 @@ class PartyPoker(HandHistoryConverter):
for action in m: for action in m:
acts = action.groupdict() acts = action.groupdict()
playerName = action.group('PNAME') playerName = action.group('PNAME')
amount = clearMoneyString(action.group('BET')) if action.group('BET') else None amount = self.clearMoneyString(action.group('BET')) if action.group('BET') else None
actionType = action.group('ATYPE') actionType = action.group('ATYPE')
if actionType == 'is all-In': if actionType == 'is all-In':
@ -530,7 +530,7 @@ class PartyPoker(HandHistoryConverter):
def readCollectPot(self,hand): def readCollectPot(self,hand):
for m in self.re_CollectPot.finditer(hand.handText): for m in self.re_CollectPot.finditer(hand.handText):
hand.addCollectPot(player=m.group('PNAME'),pot=clearMoneyString(m.group('POT'))) hand.addCollectPot(player=m.group('PNAME'),pot=self.clearMoneyString(m.group('POT')))
def readShownCards(self,hand): def readShownCards(self,hand):
for m in self.re_ShownCards.finditer(hand.handText): for m in self.re_ShownCards.finditer(hand.handText):
@ -554,10 +554,6 @@ class PartyPoker(HandHistoryConverter):
else: else:
return table_name return table_name
def clearMoneyString(money):
"Renders 'numbers' like '1 200' and '2,000'"
return money.replace(' ', '').replace(',', '')
def renderCards(string): def renderCards(string):
"Splits strings like ' Js, 4d '" "Splits strings like ' Js, 4d '"
cards = string.strip().split(' ') cards = string.strip().split(' ')

View File

@ -3,23 +3,21 @@
"""TourneyTracker.py """TourneyTracker.py
Based on HUD_main .. who knows if we want to actually use this or not Based on HUD_main .. who knows if we want to actually use this or not
""" """
# Copyright 2008-2010, Eric Blade # Copyright (c) 2009-2010 Eric Blade, and the FPDB team.
#
# This program is free software; you can redistribute it and/or modify #This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by #it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation; either version 2 of the License, or #the Free Software Foundation, version 3 of the License.
# (at your option) any later version.
# #
#This program is distributed in the hope that it will be useful, #This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of #but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details. #GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License #You should have received a copy of the GNU Affero General Public License
# along with this program; if not, write to the Free Software #along with this program. If not, see <http://www.gnu.org/licenses/>.
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #In the "official" distribution you can find the license in agpl-3.0.txt.
########################################################################
import L10n import L10n
_ = L10n.get_translation() _ = L10n.get_translation()

View File

@ -222,6 +222,8 @@ class Winamax(HandHistoryConverter):
if key == 'HID1': if key == 'HID1':
# Need to remove non-alphanumerics for MySQL # Need to remove non-alphanumerics for MySQL
hand.handid = "1%.9d%s%s"%(int(info['HID2']),info['HID1'],info['HID3']) hand.handid = "1%.9d%s%s"%(int(info['HID2']),info['HID1'],info['HID3'])
if len (hand.handid) > 19:
hand.handid = "%s" % info['HID1']
if key == 'TOURNO': if key == 'TOURNO':
hand.tourNo = info[key] hand.tourNo = info[key]
if key == 'TABLE': if key == 'TABLE':

View File

@ -624,4 +624,4 @@ class ProgressBar:
if __name__ == "__main__": if __name__ == "__main__":
print _("CLI for fpdb_import is now available as CliFpdb.py") print _("CLI for importing hands is GuiBulkImport.py")

View File

@ -0,0 +1,32 @@
{ 'boardcard1': 0,
'boardcard2': 0,
'boardcard3': 0,
'boardcard4': 0,
'boardcard5': 0,
'gametypeId': 12,
'importTime': None,
'maxSeats': 6,
'playersAtShowdown': 2,
'playersAtStreet-1': 5,
'playersAtStreet0': 2,
'playersAtStreet1': 2,
'playersAtStreet2': 2,
'playersAtStreet3': 2,
'playersAtStreet4': 0,
'playersVpi': 2,
'seats': 5,
'showdownPot': 0,
'siteHandNo': u'25325990000',
'startTime': datetime.datetime(2010, 12, 20, 15, 0, tzinfo=pytz.utc),
'street0Raises': 3,
'street1Pot': 0,
'street1Raises': 1,
'street2Pot': 0,
'street2Raises': 2,
'street3Pot': 0,
'street3Raises': 0,
'street4Pot': 0,
'street4Raises': 0,
'tableName': u"David's Draw",
'texture': None,
'tourneyId': None}

View File

@ -0,0 +1,470 @@
{ u'Hero': { 'card1': 0,
'card2': 0,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': False,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 'S',
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': False,
'seatNo': 2,
'sitout': False,
'startCards': 0,
'startCash': 174700,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 0,
'street0Raises': 0,
'street0VPI': False,
'street0_3BChance': False,
'street0_3BDone': False,
'street0_4BChance': True,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': False,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': -7500,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player1': { 'card1': 0,
'card2': 0,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': False,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 0,
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': False,
'seatNo': 1,
'sitout': False,
'startCards': 0,
'startCash': 641100,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 0,
'street0Raises': 0,
'street0VPI': False,
'street0_3BChance': False,
'street0_3BDone': False,
'street0_4BChance': True,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': False,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': 0,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player4': { 'card1': 0,
'card2': 0,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': False,
'otherRaisedStreet2': False,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 'B',
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 0,
'sawShowdown': False,
'seatNo': 4,
'sitout': False,
'startCards': 0,
'startCash': 988300,
'street0Aggr': False,
'street0Bets': 0,
'street0Calls': 0,
'street0Raises': 0,
'street0VPI': False,
'street0_3BChance': False,
'street0_3BDone': False,
'street0_4BChance': True,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': False,
'street2Aggr': False,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': False,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': False,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': -15000,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player5': { 'card1': 0,
'card2': 0,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': False,
'otherRaisedStreet2': True,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 2,
'raiseFirstInChance': True,
'raisedFirstIn': True,
'rake': 0,
'sawShowdown': True,
'seatNo': 5,
'sitout': False,
'startCards': 0,
'startCash': 424700,
'street0Aggr': True,
'street0Bets': 0,
'street0Calls': 0,
'street0Raises': 0,
'street0VPI': True,
'street0_3BChance': False,
'street0_3BDone': False,
'street0_4BChance': True,
'street0_4BDone': True,
'street1Aggr': True,
'street1Bets': 1,
'street1CBChance': True,
'street1CBDone': True,
'street1Calls': 0,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': True,
'street2Aggr': True,
'street2Bets': 1,
'street2CBChance': True,
'street2CBDone': True,
'street2Calls': 1,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': True,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': False,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': True,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': -135000,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 0,
'wonAtSD': 0.0,
'wonWhenSeenStreet1': 0.0,
'wonWhenSeenStreet2': 0.0,
'wonWhenSeenStreet3': 0.0,
'wonWhenSeenStreet4': 0.0},
u'Player6': { 'card1': 0,
'card2': 0,
'card3': 0,
'card4': 0,
'card5': 0,
'card6': 0,
'card7': 0,
'foldBbToStealChance': False,
'foldSbToStealChance': False,
'foldToOtherRaisedStreet0': False,
'foldToOtherRaisedStreet1': False,
'foldToOtherRaisedStreet2': False,
'foldToOtherRaisedStreet3': False,
'foldToOtherRaisedStreet4': False,
'foldToStreet1CBChance': False,
'foldToStreet1CBDone': False,
'foldToStreet2CBChance': False,
'foldToStreet2CBDone': False,
'foldToStreet3CBChance': False,
'foldToStreet3CBDone': False,
'foldToStreet4CBChance': False,
'foldToStreet4CBDone': False,
'foldedBbToSteal': False,
'foldedSbToSteal': False,
'other3BStreet0': False,
'other4BStreet0': False,
'otherRaisedStreet0': False,
'otherRaisedStreet1': True,
'otherRaisedStreet2': True,
'otherRaisedStreet3': False,
'otherRaisedStreet4': False,
'position': 1,
'raiseFirstInChance': False,
'raisedFirstIn': False,
'rake': 300,
'sawShowdown': True,
'seatNo': 6,
'sitout': False,
'startCards': 0,
'startCash': 368600,
'street0Aggr': True,
'street0Bets': 0,
'street0Calls': 1,
'street0Raises': 0,
'street0VPI': True,
'street0_3BChance': True,
'street0_3BDone': True,
'street0_4BChance': False,
'street0_4BDone': False,
'street1Aggr': False,
'street1Bets': 0,
'street1CBChance': False,
'street1CBDone': False,
'street1Calls': 1,
'street1CheckCallRaiseChance': False,
'street1CheckCallRaiseDone': False,
'street1Raises': 0,
'street1Seen': True,
'street2Aggr': True,
'street2Bets': 0,
'street2CBChance': False,
'street2CBDone': False,
'street2Calls': 0,
'street2CheckCallRaiseChance': False,
'street2CheckCallRaiseDone': False,
'street2Raises': 0,
'street2Seen': True,
'street3Aggr': False,
'street3Bets': 0,
'street3CBChance': True,
'street3CBDone': False,
'street3Calls': 0,
'street3CheckCallRaiseChance': False,
'street3CheckCallRaiseDone': False,
'street3Raises': 0,
'street3Seen': True,
'street4Aggr': False,
'street4Bets': 0,
'street4CBChance': False,
'street4CBDone': False,
'street4Calls': 0,
'street4CheckCallRaiseChance': False,
'street4CheckCallRaiseDone': False,
'street4Raises': 0,
'street4Seen': False,
'totalProfit': 157200,
'tourneyTypeId': None,
'tourneysPlayersIds': None,
'winnings': 292200,
'wonAtSD': 1.0,
'wonWhenSeenStreet1': 1.0,
'wonWhenSeenStreet2': 1.0,
'wonWhenSeenStreet3': 1.0,
'wonWhenSeenStreet4': 0.0}}