Merge git://git.assembla.com/fpdb

This commit is contained in:
Worros 2008-10-09 21:13:53 +08:00
commit 5389244f71
17 changed files with 492 additions and 70 deletions

View File

@ -5,8 +5,11 @@ AF=Flop Bet/Raise percentage
AT=River Bet/Raise percentage
AR=Turn Bet/Raise percentage
F3-7=3rd-7th street Fold percentage
FB=like FSB but for big blinds only
FF=Flop Fold percentage
FR=River Fold percentage
FSB=Fold to steal - combined of small and big blind (FSB means Fold Small Big). E.g. if a player faced a steal attempt in the SB 7 times and
FS=like FSB but for small blinds only.
FT=Turn Fold percentage
HD=Hands
PF3B4B=Pre Flop 3Bet or 4Bet
@ -14,6 +17,7 @@ PFR=Pre Flop Raise
Postf A=Postflop (ie. flop+turn+river) Aggression%
Postf F=Postflop Fold %
SD/F=Showdown/Flop=WtSD=How often player went to showdown when he saw the flop
ST=Steal chance (nobody had entered the pot before the player in question, and the player is in cutoff, button or SB position)
W$wsF=Won $ when he saw flop
W$@SD=Won $ at showdown
VPI3=Voluntary Put In on 3rd Street (ie. call+complete+raise)

View File

@ -141,7 +141,8 @@ The program itself is licensed under AGPLv3, see agpl-3.0.txt</p>
<TD><P>char(4)</P></TD>
<TD><p>The underlying structure. valid entries:<br>
hold - Holdem and Omaha<br>
stud - Stud and Razz </P></TD>
stud - Stud and Razz<br>
draw - (incl Badugi)</P></TD>
</TR>
<TR VALIGN=TOP>
<TD><P>category</P></TD>
@ -152,7 +153,11 @@ The program itself is licensed under AGPLv3, see agpl-3.0.txt</p>
omahahilo=Omaha 8 or better<br>
razz=Razz<br>
studhi=7 Card Stud High only<br>
studhl=7 Card Stud 8 orbetter</p></TD>
studhilo=7 Card Stud 8 or better<br>
fivedraw=Five Card Draw<br>
27_1draw=2-7 Single Draw<br>
27_3draw=2-7 Tripple Draw<br>
badugi=Badugi</p></TD>
</TR>
<TR VALIGN=TOP>
<TD><P>limitType</P></TD>
@ -297,7 +302,7 @@ The program itself is licensed under AGPLv3, see agpl-3.0.txt</p>
<TR VALIGN=TOP>
<TD><P>cardXValue</P></TD>
<TD><P>smallint</P></TD>
<TD><P>2-10=2-10, J=11, Q=12, K=13, A=14 (even in razz), unknown/no card=x</P></TD>
<TD><P>2-10=2-10, J=11, Q=12, K=13, A=14 (even in razz), unknown/no card=x, kept=k (draw only)</P></TD>
</TR>
<TR VALIGN=TOP>
<TD><P>cardXSuit</P></TD>
@ -307,7 +312,11 @@ The program itself is licensed under AGPLv3, see agpl-3.0.txt</p>
</TABLE>
<p><BR></P>
<p><B>Table HandsPlayers</B></P>
<p>cardX: can be 1 through 7, one for each card. In holdem/omaha this stores the hole cards so 3-7 or 5-7 are empty</P>
<p>cardX: can be 1 through 20, one for each card. In holdem only 1-2 of these are used, in omaha 1-4, in stud/razz 1-7, in single draw games 1-10 is used and in badugi 1-16 (4*4) is used.</P>
<p>For the draw games: the first 5 (badugi: 4) cards are the initial cards, the next 5 (badugi: 4) are after the first draw. If a player keeps some cards then those cards' spaces are filled with "k", short for "kept".<br>
Example 1: If a player gets 2-6 spades for his first five cards and decides to throw away the 4 and then gets a 7 of spades then the first 10 fields of cardXValue would be as follows: 2, 3, 4, 5, 6, k, k, 7, k, k<br>
Example 2: If a player gets 2, 3, 5, 8, J of spades for his first five cards and decides to throw away the 2 and the 3 and then gets a Q and K of spades then the first 10 fields of cardXValue would be as follows: 2, 3, 5, 8, J, Q, K, k, k, k<br>
Note that it will k in the space of which card was there previously, so in example 2 where the player kept the last 3 cards, the last 3 fields of the first draw (ie. card8-10Value) are replaced with k.</p>
<p>I did not separate this into an extra table because I felt the lost space is not sufficiently large. Also the benefit for searching is far less relevant.</P>
<TABLE BORDER=1 CELLPADDING=2 CELLSPACING=0>
<TR VALIGN=TOP>

View File

@ -0,0 +1,182 @@
;"%programfiles%\MySQL\MySQL Server 5.0\bin\mysqld" --remove
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Includes
#include <GUIConstantsEx.au3>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Variables
Dim $rootPwd = ""
Dim $fpdbUserPwd = ""
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Welcome message and option to abort. Change of working dir to \fpdbEnv
Dim $welcomeBox = MsgBox(4100, "fpdb environment installation", "This installer will automatically create the environment which is needed to run fpdb." & @CRLF & @CRLF & _
"This means installing and configuring MySQL and Python including some special modules," & @CRLF & "creating a directory for your fpdb user profile and adding gtk to your path." & @CRLF & @CRLF & _
"You are advised to close all aplications before you proceed." & @CRLF & @CRLF & _
"DON'T use the keyboard or the mouse during installation unless you are asked to! Just WAIT until the message box 'End of Installation' pops up!" & @CRLF & @CRLF & _
"If you want to continue the installation click 'Yes'." & @CRLF & "If you want to abort the installation click 'No'.")
If $welcomeBox == 7 Then
Exit ;Exit Installation if 'No' button is clicked in message box
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Ask user for mysql root password
GUICreate("FPDB Environment Installation", 600, 400)
GUICtrlCreateLabel("For the installation of the FPDB Environment the MySQL root password and your poker database password are needed.", 20, 25)
GUICtrlCreateLabel("In case MySQL and/or your fpdb poker database aren't installed on your computer, just pick a password.", 20, 50)
GUICtrlCreateLabel("MySQL Root Password:", 20, 100)
$rootPw = GUICtrlCreateInput("your password here", 150, 100, 100, 20)
GUICtrlCreateLabel("Retype password:", 290, 100)
$rootPwR = GUICtrlCreateInput("", 420, 100, 100, 20)
GUICtrlCreateLabel("Poker DB User Password:", 20, 150)
$userPw = GUICtrlCreateInput("your password here", 150, 150, 100, 20)
GUICtrlCreateLabel("Retype password:", 290, 150)
$userPwR = GUICtrlCreateInput("", 420, 150, 100, 20)
$okbutton = GUICtrlCreateButton("OK", 270, 200, 60, 20)
$status = GUICtrlCreateLabel("This is the status line. It describes what the installer is doing at the moment.", 20, 250, 560)
GUISetState(@SW_SHOW)
While 1
$msg = GUIGetMsg()
Select
Case $msg = $okbutton
If Not(GUICtrlRead($rootPw) == GUICtrlRead($rootPwR)) OR GUICtrlRead($rootPw) == "" Then
MsgBox(16, "", "The passwords don't macht! Try again!", 20, 250)
ElseIf Not(GUICtrlRead($userPw) == GUICtrlRead($userPwR)) OR GUICtrlRead($userPw) == "" Then
MsgBox(16, "", "The passwords don't macht! Try again!", 20, 250)
Else
$rootPwd = GUICtrlRead($rootPw)
$fpdbUserPwd = GUICtrlRead($userPw)
GUICtrlSetState($okbutton, $GUI_DISABLE)
ExitLoop
EndIf
EndSelect
WEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Files Needed
FileInstall("fpdb\7za.exe", "7za.exe")
FileInstall("fpdb\MySQL Server 5.0.7z", "MySQL Server 5.0.7z")
FileInstall("fpdb\gtk.7z", "gtk.7z")
FileInstall("fpdb\python-2.5.2.msi", "python-2.5.2.msi")
FileInstall("fpdb\pymysql.7z", "pymysql.7z")
FileInstall("fpdb\pycairo.7z", "pycairo.7z")
FileInstall("fpdb\pygobject.7z", "pygobject.7z")
FileInstall("fpdb\pygtk.7z", "pygtk.7z")
FileInstall("fpdb\psykopg2.7z", "psykopg2.7z")
FileInstall("fpdb\pywin32.7z", "pywin32.7z")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; MySQL Install and configuration
If NOT FileExists(EnvGet("programfiles") & "\MySQL\MySQL Server 5.0\bin\mysql.exe") Then
GUICtrlSetData($status, "Installing MySQL Database Management System and creating MySQL windows service.")
RunWait('7za.exe x "MySQL Server 5.0.7z" -o"' & EnvGet("programfiles") & '\MySQL\" -aoa', "", @SW_HIDE)
RunWait('"' & EnvGet("programfiles") & '\MySQL\MySQL Server 5.0\bin\mysqld" --install', "", @SW_HIDE)
RunWait("net start mysql", "", @SW_HIDE)
ProcessWait("mysqld.exe")
GUICtrlSetData($status, "Securing important MySQL user accounts.")
Sleep(5000)
FileWrite(EnvGet("programfiles") & "\MySQL\MySQL Server 5.0\bin\mysql1.txt", "DELETE FROM mysql.user WHERE User = '';" & @CRLF)
FileWrite(EnvGet("programfiles") & "\MySQL\MySQL Server 5.0\bin\mysql1.txt", "UPDATE mysql.user SET Password = PASSWORD('" & $rootPwd & "') WHERE User = 'root';" & @CRLF)
FileWrite(EnvGet("programfiles") & "\MySQL\MySQL Server 5.0\bin\mysql1.txt", "FLUSH PRIVILEGES;" & @CRLF)
RunWait(@ComSpec & ' /c mysql --user=root -e "source mysql1.txt"', EnvGet("programfiles") & '\MySQL\MySQL Server 5.0\bin\', @SW_HIDE)
EndIf
If NOT FileExists(EnvGet("programfiles") & "\MySQL\MySQL Server 5.0\data\fpdb") Then
GUICtrlSetData($status, "Creating fpdb database.")
FileWrite(EnvGet("programfiles") & "\MySQL\MySQL Server 5.0\bin\mysql2.txt", "create database fpdb;" & @CRLF)
RunWait(@ComSpec & ' /c mysql --user=root --password=' & $rootPwd & ' -e "source mysql2.txt"', EnvGet("programfiles") & '\MySQL\MySQL Server 5.0\bin\', @SW_HIDE)
EndIf
GUICtrlSetData($status, "Creating MySQL user 'fpdb' and granting privileges.")
FileWrite(EnvGet("programfiles") & "\MySQL\MySQL Server 5.0\bin\mysql3.txt", "GRANT ALL PRIVILEGES ON fpdb.* TO 'fpdb'@'localhost' IDENTIFIED BY '" & $fpdbUserPwd & "' WITH GRANT OPTION;" & @CRLF)
RunWait(@ComSpec & ' /c mysql --user=root --password=' & $rootPwd & ' -e "source mysql3.txt"', EnvGet("programfiles") & '\MySQL\MySQL Server 5.0\bin\', @SW_HIDE)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; GTK
GUICtrlSetData($status, "Installing GTK.")
RunWait('7za.exe x "gtk.7z" -oc:\ -aoa', "", @SW_HIDE)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Python 2.5 Installation
GUICtrlSetData($status, "Installing Python 2.5.2")
RunWait("msiexec /quiet /i python-2.5.2.msi", "", @SW_HIDE) ;Install Python without user interaction
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; pymysql
GUICtrlSetData($status, "Installing pymysql")
RunWait('7za.exe x "pymysql.7z" -oC:\Python25\Lib\site-packages -aoa', "", @SW_HIDE)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; pycairo
GUICtrlSetData($status, "Installing pycairo")
RunWait('7za.exe x "pycairo.7z" -oC:\ -aoa', "", @SW_HIDE)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; pygobject
GUICtrlSetData($status, "Installing pygobject")
RunWait('7za.exe x "pygobject.7z" -oC:\ -aoa', "", @SW_HIDE)
RunWait(@ComSpec & ' /c C:\Python25\python.exe pygobject_postinstall.py -install', "C:\Python25\SCRIPTS", @SW_HIDE)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; pygtk
GUICtrlSetData($status, "Installing pygtk")
RunWait('7za.exe x "pygtk.7z" -oC:\ -aoa', "", @SW_HIDE)
RunWait(@ComSpec & ' /c C:\Python25\python.exe pygtk_postinstall.py -install', "C:\Python25\SCRIPTS", @SW_HIDE)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; psykopg2
GUICtrlSetData($status, "Installing psykopg2")
RunWait('7za.exe x "psykopg2.7z" -oC:\ -aoa', "", @SW_HIDE)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; pywin32
GUICtrlSetData($status, "Installing pywin32 for Python 2.5")
RunWait('7za.exe x "pywin32.7z" -oC:\ -aoa', "", @SW_HIDE)
RunWait(@ComSpec & ' /c C:\Python25\python.exe pywin32_postinstall.py -install', "C:\Python25\SCRIPTS", @SW_HIDE)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Creating directory for default.conf and coping the file into it
GUICtrlSetData($status, "Creating and installing default.conf file.")
$file = FileOpen("default.conf", 1)
FileWriteLine($file, "db-backend=2" & @CRLF)
FileWriteLine($file, "db-host=localhost" & @CRLF)
FileWriteLine($file, "db-databaseName=fpdb" & @CRLF)
FileWriteLine($file, "db-user=fpdb" & @CRLF)
FileWriteLine($file, "db-password=" & $fpdbUserPwd & @CRLF)
FileWriteLine($file, "tv-combinedStealFold=True" & @CRLF)
FileWriteLine($file, "tv-combined2B3B=True" & @CRLF)
FileWriteLine($file, "tv-combinedPostflop=True" & @CRLF)
FileWriteLine($file, "bulkImport-defaultPath=default" & @CRLF)
FileWriteLine($file, "hud-defaultPath=default" & @CRLF)
FileWriteLine($file, "imp-callFpdbHud=True" & @CRLF)
FileClose($file)
FileCopy("default.conf", EnvGet("appdata") & "\fpdb\", 9)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Registry
GUICtrlSetData($status, "Creating backup of path variable and adding GTK and Python to path variable.")
RegWrite("HKEY_CURRENT_USER\Environment", "PathBackup", "REG_SZ", RegRead("HKEY_CURRENT_USER\Environment", "path"))
RegWrite("HKEY_CURRENT_USER\Environment", "path", "REG_SZ", RegRead("HKEY_CURRENT_USER\Environment", "path") & ';C:\gtk\bin;C:\Python25')
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Delete installation files
GUICtrlSetData($status, "Deleting temporary installation files.")
FileDelete("7za.exe")
FileDelete("MySQL Server 5.0.7z")
FileDelete("gtk.7z")
FileDelete("python-2.5.2.msi")
FileDelete("pymysql.7z")
FileDelete("pycairo.7z")
FileDelete("pygobject.7z")
FileDelete("pygtk.7z")
FileDelete("psykopg2.7z")
FileDelete("pywin32.7z")
FileDelete("default.conf")
$goodbyeBox = MsgBox(4100, "End of Installation", "The Computer needs to be restarted for the installation to be complete." & @CRLF & _
"After that you can start fpdb by double clicking the file fpdb.py which is located in the folder pyfpdb of the fpdb build you downloaded." & @CRLF & _
"If you haven't downloaded fpdb yet you can do it here: http://ovh.dl.sourceforge.net/sourceforge/fpdb/fpdb-alpha2-p68.zip" & @CRLF & @CRLF & _
"If you want to restart the computer now click 'Yes'." & @CRLF & _
"If you want to restart the computer later click 'No'.")
If $goodbyeBox == 7 Then
Exit ;Exit Installation if 'No' button is clicked in message box
EndIf
Run("shutdown.exe -r -t 0")

View File

@ -425,7 +425,7 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt")
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.connect("delete_event", self.delete_event)
self.window.connect("destroy", self.destroy)
self.window.set_title("Free Poker DB - version: alpha6+, p118 or higher")
self.window.set_title("Free Poker DB - version: alpha6+, p124 or higher")
self.window.set_border_width(1)
self.window.set_size_request(1020,400)
self.window.set_resizable(True)
@ -449,7 +449,7 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt")
("/Viewers/_Player Stats (tabulated view) (todo)", None, self.not_implemented, 0, None ),
("/Viewers/Starting _Hands (todo)", None, self.not_implemented, 0, None ),
("/Viewers/_Session Replayer (todo)", None, self.not_implemented, 0, None ),
("/Viewers/Poker_table Viewer (obselete)", "<control>T", self.tab_table_viewer, 0, None ),
("/Viewers/Poker_table Viewer (mostly obselete)", "<control>T", self.tab_table_viewer, 0, None ),
#( "/Viewers/Tourney Replayer
( "/_Database", None, None, 0, "<Branch>" ),
( "/Database/Create or Delete _Database (todo)", None, self.dia_create_del_database, 0, None ),

View File

@ -181,17 +181,22 @@ class Importer:
startpos=endpos
print "Total stored:", stored, "duplicates:", duplicates, "partial:", partial, "errors:", errors
if stored==0 and duplicates>0:
for line_no in range(len(lines)):
if lines[line_no].find("Game #")!=-1:
final_game_line=lines[line_no]
handsId=fpdb_simple.parseSiteHandNo(final_game_line)
#todo: this will cause return of an unstored hand number if the last hadn was error or partial
if stored==0:
if duplicates>0:
for line_no in range(len(lines)):
if lines[line_no].find("Game #")!=-1:
final_game_line=lines[line_no]
handsId=fpdb_simple.parseSiteHandNo(final_game_line)
else:
print "failed to read a single hand from file:", inputFile
handsId=0
#todo: this will cause return of an unstored hand number if the last hand was error or partial
db.commit()
inputFile.close()
cursor.close()
db.close()
return handsId
#end def import_file_dict
if __name__ == "__main__":

View File

@ -86,6 +86,10 @@ def mainParser(db, cursor, site, category, hand):
for i in range(len(hand)):
if (lineTypes[i]=="cards"):
fpdb_simple.parseCardLine (site, category, lineStreets[i], hand[i], names, cardValues, cardSuits, boardValues, boardSuits)
#if category=="studhilo":
# print "hand[i]:", hand[i]
# print "cardValues:", cardValues
# print "cardSuits:", cardSuits
elif (lineTypes[i]=="action"):
fpdb_simple.parseActionLine (site, base, isTourney, hand[i], lineStreets[i], playerIDs, names, actionTypes, allIns, actionAmounts, actionNos, actionTypeByNo)
elif (lineTypes[i]=="win"):
@ -108,8 +112,9 @@ def mainParser(db, cursor, site, category, hand):
tableResult=fpdb_simple.parseTableLine(site, base, hand[0])
maxSeats=tableResult['maxSeats']
tableName=tableResult['tableName']
#print "before part5, antes:", antes
#part 5: final preparations, then call fpdb_save_to_db.saveHoldem with
#part 5: final preparations, then call fpdb_save_to_db.* with
# the arrays as they are - that file will fill them.
fpdb_simple.convertCardValues(cardValues)
if base=="hold":
@ -140,11 +145,8 @@ def mainParser(db, cursor, site, category, hand):
result = fpdb_save_to_db.tourney_holdem_omaha(cursor, base, category, siteTourneyNo, buyin, fee, knockout, entries, prizepool, tourneyStartTime, payin_amounts, ranks, tourneyTypeId, siteID,
siteHandNo, gametypeID, handStartTime, names, playerIDs, startCashes, positions, cardValues, cardSuits, boardValues, boardSuits, winnings, rakes, actionTypes, allIns, actionAmounts, actionNos, hudImportData, maxSeats, tableName, seatNos)
elif base=="stud":
result = fpdb_save_to_db.tourney_stud(cursor, base, category, siteTourneyNo, buyin, fee,
knockout, entries, prizepool, tourneyStartTime, payin_amounts, ranks,
siteHandNo, siteID, gametypeID, handStartTime, names, playerIDs,
startCashes, antes, cardValues, cardSuits, winnings, rakes,
actionTypes, allIns, actionAmounts, actionNos, hudImportData, maxSeats, tableName, seatNos)
result = fpdb_save_to_db.tourney_stud(cursor, base, category, siteTourneyNo, buyin, fee, knockout, entries, prizepool, tourneyStartTime, payin_amounts, ranks, tourneyTypeId, siteID,
siteHandNo, gametypeID, handStartTime, names, playerIDs, startCashes, antes, cardValues, cardSuits, winnings, rakes, actionTypes, allIns, actionAmounts, actionNos, hudImportData, maxSeats, tableName, seatNos)
else:
raise fpdb_simple.FpdbError ("unrecognised category")
else:

View File

@ -26,6 +26,7 @@ def ring_stud(cursor, base, category, site_hand_no, gametype_id, hand_start_time
hands_id=fpdb_simple.storeHands(cursor, site_hand_no, gametype_id, hand_start_time, names, tableName, maxSeats)
#print "before calling store_hands_players_stud, antes:", antes
hands_players_ids=fpdb_simple.store_hands_players_stud(cursor, hands_id, player_ids,
start_cashes, antes, card_values, card_suits, winnings, rakes, seatNos)
@ -73,25 +74,21 @@ def tourney_holdem_omaha(cursor, base, category, siteTourneyNo, buyin, fee, knoc
return hands_id
#end def tourney_holdem_omaha
def tourney_stud(cursor, base, category, site_tourney_no, buyin, fee, knockout, entries, prizepool,
tourney_start, payin_amounts, ranks, #end of tourney specific params
site_hand_no, site_id, gametype_id, hand_start_time, names, player_ids,
start_cashes, antes, card_values, card_suits, winnings, rakes,
action_types, allIns, action_amounts, hudImportData):
def tourney_stud(cursor, base, category, siteTourneyNo, buyin, fee, knockout, entries, prizepool, tourneyStartTime, payin_amounts, ranks, tourneyTypeId, siteId,
siteHandNo, gametypeId, handStartTime, names, playerIds, startCashes, antes, cardValues, cardSuits, winnings, rakes, actionTypes, allIns, actionAmounts, actionNos, hudImportData, maxSeats, tableName, seatNos):
#stores a tourney stud/razz hand into the database
fpdb_simple.fillCardArrays(len(names), base, category, card_values, card_suits)
fpdb_simple.fillCardArrays(len(names), base, category, cardValues, cardSuits)
tourney_id=fpdb_simple.store_tourneys(cursor, site_id, site_tourney_no, buyin, fee, knockout, entries, prizepool, tourney_start)
tourney_id=fpdb_simple.store_tourneys(cursor, tourneyTypeId, siteTourneyNo, entries, prizepool, tourneyStartTime)
tourneys_players_ids=fpdb_simple.store_tourneys_players(cursor, tourney_id, player_ids, payin_amounts, ranks, winnings)
tourneys_players_ids=fpdb_simple.store_tourneys_players(cursor, tourney_id, playerIds, payin_amounts, ranks, winnings)
hands_id=fpdb_simple.storeHands(cursor, site_hand_no, gametype_id, hand_start_time, names)
hands_id=fpdb_simple.storeHands(cursor, siteHandNo, gametypeId, handStartTime, names, tableName, maxSeats)
hands_players_ids=fpdb_simple.store_hands_players_stud_tourney(cursor, hands_id, player_ids,
start_cashes, antes, card_values, card_suits, winnings, rakes, tourneys_players_ids)
hands_players_ids=fpdb_simple.store_hands_players_stud_tourney(cursor, hands_id, playerIds, startCashes, antes, cardValues, cardSuits, winnings, rakes, seatNos, tourneys_players_ids)
fpdb_simple.storeHudData(cursor, base, category, player_ids, hudImportData)
fpdb_simple.storeHudCache(cursor, base, category, gametypeId, playerIds, hudImportData)
fpdb_simple.storeActions(cursor, hands_players_ids, action_types, allIns, action_amounts)
fpdb_simple.storeActions(cursor, hands_players_ids, actionTypes, allIns, actionAmounts, actionNos)
return hands_id
#end def tourney_stud

View File

@ -579,6 +579,7 @@ def parseActionAmount(line, atype, site, isTourney):
else:
if not isTourney:
pos=line.rfind("$")+1
#print "parseActionAmount, line:", line, "line[pos:]:", line[pos:]
amount=float2int(line[pos:])
else:
#print "line:"+line+"EOL"
@ -676,7 +677,6 @@ def parseActionType(line):
#parses the ante out of the given line and checks which player paid it, updates antes accordingly.
def parseAnteLine(line, site, isTourney, names, antes):
#print "parseAnteLine line: ",line
for i in range(len(names)):
if (line.startswith(names[i].encode("latin-1"))): #found the ante'er
pos=line.rfind("$")+1
@ -690,6 +690,7 @@ def parseAnteLine(line, site, isTourney, names, antes):
pos1=line.rfind("ante")+5
pos2=line.find(" ",pos1)
antes[i]+=int(line[pos1:pos2])
#print "parseAnteLine line: ", line, "antes[i]", antes[i], "antes", antes
#end def parseAntes
#returns the buyin of a tourney in cents
@ -730,18 +731,31 @@ def parseCardLine(site, category, street, line, names, cardValues, cardSuits, bo
raise FpdbError("read too many/too few holecards in parseCardLine")
elif (category=="razz" or category=="studhi" or category=="studhilo"):
if (line.find("shows")==-1):
cardValues[playerNo][street-1]=line[pos:pos+1]
cardSuits[playerNo][street-1]=line[pos+1:pos+2]
#print "parseCardLine(in stud if), street:", street
if line[pos+2]=="]": #-> not (hero and 3rd street)
cardValues[playerNo][street+2]=line[pos:pos+1]
cardSuits[playerNo][street+2]=line[pos+1:pos+2]
else:
#print "hero card1:", line[pos:pos+2], "hero card2:", line[pos+3:pos+5], "hero card3:", line[pos+6:pos+8],
cardValues[playerNo][street]=line[pos:pos+1]
cardSuits[playerNo][street]=line[pos+1:pos+2]
cardValues[playerNo][street+1]=line[pos+3:pos+4]
cardSuits[playerNo][street+1]=line[pos+4:pos+5]
cardValues[playerNo][street+2]=line[pos+6:pos+7]
cardSuits[playerNo][street+2]=line[pos+7:pos+8]
else:
#print "parseCardLine(in stud else), street:", street
cardValues[playerNo][0]=line[pos:pos+1]
cardSuits[playerNo][0]=line[pos+1:pos+2]
pos+=3
cardValues[playerNo][1]=line[pos:pos+1]
cardSuits[playerNo][1]=line[pos+1:pos+2]
if street==7:
pos+=15
if street==4:
pos=pos=line.rfind("]")-2
cardValues[playerNo][6]=line[pos:pos+1]
cardSuits[playerNo][6]=line[pos+1:pos+2]
#print "cardValues:", cardValues
#print "cardSuits:", cardSuits
else:
print "line:",line,"street:",street
raise FpdbError("invalid category")
@ -1267,6 +1281,7 @@ def store_hands_players_stud(cursor, hands_id, player_ids, start_cashes, antes,
card_values, card_suits, winnings, rakes, seatNos):
#stores hands_players rows for stud/razz games. returns an array of the resulting IDs
result=[]
#print "before inserts in store_hands_players_stud, antes:", antes
for i in range (len(player_ids)):
cursor.execute ("""INSERT INTO HandsPlayers
(handId, playerId, startCash, ante,
@ -1319,24 +1334,24 @@ def store_hands_players_holdem_omaha_tourney(cursor, category, hands_id, player_
#end def store_hands_players_holdem_omaha_tourney
def store_hands_players_stud_tourney(cursor, hands_id, player_ids, start_cashes,
antes, card_values, card_suits, winnings, rakes, tourneys_players_ids):
antes, card_values, card_suits, winnings, rakes, seatNos, tourneys_players_ids):
#stores hands_players for tourney stud/razz hands
result=[]
for i in range (len(player_ids)):
cursor.execute ("""INSERT INTO HandsPlayers
(hand_id, player_id, player_startcash, ante,
card1_value, card1_suit, card2_value, card2_suit,
card3_value, card3_suit, card4_value, card4_suit,
card5_value, card5_suit, card6_value, card6_suit,
card7_value, card7_suit, winnings, rake, tourneys_players_id)
(handId, playerId, startCash, ante,
card1Value, card1Suit, card2Value, card2Suit,
card3Value, card3Suit, card4Value, card4Suit,
card5Value, card5Suit, card6Value, card6Suit,
card7Value, card7Suit, winnings, rake, tourneysPlayersId, seatNo)
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s)""",
%s, %s, %s, %s, %s, %s)""",
(hands_id, player_ids[i], start_cashes[i], antes[i],
card_values[i][0], card_suits[i][0], card_values[i][1], card_suits[i][1],
card_values[i][2], card_suits[i][2], card_values[i][3], card_suits[i][3],
card_values[i][4], card_suits[i][4], card_values[i][5], card_suits[i][5],
card_values[i][6], card_suits[i][6], winnings[i], rakes[i], tourneys_players_ids[i]))
cursor.execute("SELECT id FROM hands_players WHERE hand_id=%s AND player_id=%s", (hands_id, player_ids[i]))
card_values[i][6], card_suits[i][6], winnings[i], rakes[i], tourneys_players_ids[i], seatNos[i]))
cursor.execute("SELECT id FROM HandsPlayers WHERE handId=%s AND playerId=%s", (hands_id, player_ids[i]))
result.append(cursor.fetchall()[0][0])
return result
#end def store_hands_players_stud_tourney
@ -1511,10 +1526,26 @@ def generateHudCacheData(player_ids, base, category, action_types, allIns, actio
if (len(action_types[3][player])>0 or isAllIn):
myStreet3Seen=True
mySawShowdown=True
for count in range (len(action_types[3][player])):
if action_types[3][player][count]=="fold":
mySawShowdown=False
#print "base:", base
if base=="hold":
mySawShowdown=True
for count in range (len(action_types[3][player])):
if action_types[3][player][count]=="fold":
mySawShowdown=False
else:
#print "in else"
for i in range(len(allIns[3][player])):
if allIns[3][player][i]:
isAllIn=True
if (len(action_types[4][player])>0 or isAllIn):
#print "in if"
myStreet4Seen=True
mySawShowdown=True
for count in range (len(action_types[4][player])):
if action_types[4][player][count]=="fold":
mySawShowdown=False
#flop stuff
street=1
@ -1570,6 +1601,24 @@ def generateHudCacheData(player_ids, base, category, action_types, allIns, actio
if action_types[street][player][countOtherFold]=="fold":
myFoldToOtherRaisedStreet3=True
#stud river stuff - copy of flop with different vars
street=4
if myStreet4Seen:
for count in range(len(action_types[street][player])):
if action_types[street][player][count]=="bet":
myStreet4Aggr=True
for otherPlayer in range (len(player_ids)):
if player==otherPlayer:
pass
else:
for countOther in range (len(action_types[street][otherPlayer])):
if action_types[street][otherPlayer][countOther]=="bet":
myOtherRaisedStreet4=True
for countOtherFold in range (len(action_types[street][player])):
if action_types[street][player][countOtherFold]=="fold":
myFoldToOtherRaisedStreet4=True
if winnings[player]!=0:
if myStreet1Seen:
myWonWhenSeenStreet1=winnings[player]/float(totalWinnings)

View File

@ -148,7 +148,7 @@ for i in range (len(handsPlayers)):
else:
printstr+=ful.cards2String(line[5:13])
elif (category=="razz" or category=="studhi" or category=="studhilo"):
printstr+=" ante:"+str(line[3])+" cards:"
printstr+=" ante:"+str(line[4])+" cards:"
printstr+=ful.cards2String(line[5:19])
else:
print "TODO: raise error, print_hand.py"
@ -167,7 +167,7 @@ for i in range (len(handsPlayers)):
line=handsActions[j][2:]
printstr="playerName:"+playerNames[i]
printstr+=" street:"+ful.street_int2String(category, line[0])+" streetActionNo:"+str(line[1])+" action:"+line[2]
printstr+=" amount:"+str(line[3])
printstr+=" amount:"+str(line[4])
print printstr
cursor.close()

View File

@ -23,7 +23,7 @@ from optparse import OptionParser
import fpdb_util_lib as ful
parser = OptionParser()
parser.add_option("-b", "--bigblind", default="2", type="int", help="big blinds in cent")
parser.add_option("-b", "--bigBet", default="4", type="int", help="big bet in cent")
parser.add_option("-c", "--cat", "--category", default="holdem", help="Category, e.g. holdem or studhilo")
parser.add_option("-e", "--seats", default="7", type="int", help="number of active seats")
parser.add_option("-g", "--gameType", default="ring", help="Whether its a ringgame (ring) or a tournament (tour)")
@ -42,19 +42,19 @@ print "Connected to MySQL on localhost. Print Player Flags Utility"
print ""
print "Basic Data"
print "=========="
print "bigblind:",options.bigblind, "category:",options.cat, "limitType:", options.limit, "name:", options.name, "gameType:", options.gameType, "site:", options.site
print "bigBet:",options.bigBet, "category:",options.cat, "limitType:", options.limit, "name:", options.name, "gameType:", options.gameType, "site:", options.site
cursor.execute("SELECT id FROM Sites WHERE name=%s", (options.site,))
siteId=cursor.fetchone()[0]
cursor.execute("SELECT id FROM Gametypes WHERE bigBlind=%s AND category=%s AND siteId=%s AND limitType=%s AND type=%s", (options.bigblind, options.cat, siteId, options.limit, options.gameType))
cursor.execute("SELECT id FROM Gametypes WHERE bigBet=%s AND category=%s AND siteId=%s AND limitType=%s AND type=%s", (options.bigBet, options.cat, siteId, options.limit, options.gameType))
gametypeId=cursor.fetchone()[0]
cursor.execute("SELECT id FROM Players WHERE name=%s", (options.name,))
playerId=cursor.fetchone()[0]
cursor.execute("SELECT id FROM HudCache WHERE gametypeId=%s AND playerId=%s AND activeSeats=%s AND position=%s",(gametypeId, playerId, options.seats, options.position))
#print "debug: gametypeId:", gametypeId, "playerId:", playerId, "options.seats:", options.seats, "options.position:", options.position
cursor.execute("SELECT id FROM HudCache WHERE gametypeId=%s AND playerId=%s AND activeSeats=%s AND position=%s",(gametypeId, playerId, options.seats, options.position))
hudDataId=cursor.fetchone()[0]
print "siteId:", siteId, "gametypeId:", gametypeId, "playerId:", playerId, "hudDataId:", hudDataId

View File

@ -2,7 +2,7 @@ Connected to MySQL on localhost. Print Player Flags Utility
Basic Data
==========
bigblind: 2 category: holdem limitType: fl name: Player_5 gameType: ring site: PokerStars
bigBet: 4 category: holdem limitType: fl name: Player_5 gameType: ring site: PokerStars
siteId: 2 gametypeId: 1 playerId: 5 hudDataId: 12
HUD Raw Hand Counts
@ -33,8 +33,8 @@ foldToOtherRaisedStreet2: 0
foldToOtherRaisedStreet3: 0
foldToOtherRaisedStreet4: 0
wonWhenSeenStreet1: 0
wonAtSD: 0
wonWhenSeenStreet1: 0.0
wonAtSD: 0.0
stealAttemptChance: 0
stealAttempted: 0
foldBbToStealChance: 0

View File

@ -2,7 +2,7 @@ Connected to MySQL on localhost. Print Player Flags Utility
Basic Data
==========
bigblind: 25 category: holdem limitType: fl name: player3 gameType: ring site: PokerStars
bigBet: 50 category: holdem limitType: fl name: player3 gameType: ring site: PokerStars
siteId: 2 gametypeId: 2 playerId: 11 hudDataId: 22
HUD Raw Hand Counts

View File

@ -2,7 +2,7 @@ Connected to MySQL on localhost. Print Player Flags Utility
Basic Data
==========
bigblind: 2 category: holdem limitType: fl name: Player_1 gameType: ring site: PokerStars
bigBet: 4 category: holdem limitType: fl name: Player_1 gameType: ring site: PokerStars
siteId: 2 gametypeId: 1 playerId: 1 hudDataId: 8
HUD Raw Hand Counts

View File

@ -0,0 +1,68 @@
Connected to MySQL on localhost. Print Player Flags Utility
Basic Data
==========
bigBet: 20 category: studhilo limitType: fl name: br1an gameType: ring site: PokerStars
siteId: 2 gametypeId: 3 playerId: 21 hudDataId: 32
HUD Raw Hand Counts
===================
HDs: 1
street0VPI: 0
street0Aggr: 0
street0_3B4BChance: 0
street0_3B4BDone: 0
street1Seen: 1
street2Seen: 1
street3Seen: 1
street4Seen: 1
sawShowdown: 1
street1Aggr: 0
street2Aggr: 0
street3Aggr: 0
street4Aggr: 0
otherRaisedStreet1: 0
otherRaisedStreet2: 1
otherRaisedStreet3: 0
otherRaisedStreet4: 1
foldToOtherRaisedStreet1: 0
foldToOtherRaisedStreet2: 0
foldToOtherRaisedStreet3: 0
foldToOtherRaisedStreet4: 0
wonWhenSeenStreet1: 0.0
wonAtSD: 0.0
stealAttemptChance: 0
stealAttempted: 0
foldBbToStealChance: 0
foldedBbToSteal: 0
foldSbToStealChance: 0
foldedSbToSteal: 0
street1CBChance: 0
street1CBDone: 0
street2CBChance: 0
street2CBDone: 0
street3CBChance: 0
street3CBDone: 0
street4CBChance: 0
street4CBDone: 0
foldToStreet1CBChance: 0
foldToStreet1CBDone: 0
foldToStreet2CBChance: 0
foldToStreet2CBDone: 0
foldToStreet3CBChance: 0
foldToStreet3CBDone: 0
foldToStreet4CBChance: 0
foldToStreet4CBDone: 0
totalProfit: -0.47
street1CheckCallRaiseChance: 0
street1CheckCallRaiseDone: 0
street2CheckCallRaiseChance: 0
street2CheckCallRaiseDone: 0
street3CheckCallRaiseChance: 0
street3CheckCallRaiseDone: 0
street4CheckCallRaiseChance: 1
street4CheckCallRaiseDone: 0

View File

@ -0,0 +1,67 @@
PokerStars Game #15043388146: 7 Card Stud Hi/Lo Limit ($0.10/$0.20) - 2008/02/03 - 22:04:15 (ET)
Table 'Lydia' 8-max
Seat 2: olimpicon99 ($5.31 in chips)
Seat 4: PokerPig55 ($1.58 in chips)
Seat 5: VISTA GIRL ($0.83 in chips)
Seat 6: br1an ($5.10 in chips)
Seat 7: steffen780 ($4 in chips)
Seat 8: willowdale ($3.92 in chips)
olimpicon99: posts the ante $0.02
PokerPig55: posts the ante $0.02
VISTA GIRL: posts the ante $0.02
br1an: posts the ante $0.02
steffen780: posts the ante $0.02
willowdale: posts the ante $0.02
*** 3rd STREET ***
Dealt to olimpicon99 [8c]
Dealt to PokerPig55 [Kh]
Dealt to VISTA GIRL [8h]
Dealt to br1an [2d]
Dealt to steffen780 [Kc 9h 9c]
Dealt to willowdale [5s]
br1an: brings in for $0.05
steffen780: calls $0.05
willowdale: calls $0.05
olimpicon99: folds
olimpicon99 leaves the table
PokerPig55: folds
VISTA GIRL: folds
*** 4th STREET ***
Dealt to br1an [2d] [Qh]
Dealt to steffen780 [Kc 9h 9c] [5c]
Dealt to willowdale [5s] [4s]
br1an: checks
steffen780: checks
willowdale: checks
*** 5th STREET ***
Dealt to br1an [2d Qh] [6d]
Dealt to steffen780 [Kc 9h 9c 5c] [8s]
Dealt to willowdale [5s 4s] [Ad]
willowdale: bets $0.20
br1an: calls $0.20
steffen780: folds
*** 6th STREET ***
Dealt to br1an [2d Qh 6d] [6h]
Dealt to willowdale [5s 4s Ad] [5h]
br1an: checks
willowdale: checks
*** RIVER ***
br1an: checks
willowdale: bets $0.20
br1an: calls $0.20
*** SHOW DOWN ***
willowdale: shows [3s 4d 5s 4s Ad 5h 2c] (HI: a straight, Ace to Five; LO: 5,4,3,2,A)
br1an: shows [4c 7d 2d Qh 6d 6h 2h] (HI: two pair, Sixes and Deuces)
willowdale collected $0.51 from pot
willowdale collected $0.51 from pot
*** SUMMARY ***
Total pot $1.07 | Rake $0.05
Seat 2: olimpicon99 folded on the 3rd Street (didn't bet)
Seat 4: PokerPig55 folded on the 3rd Street (didn't bet)
Seat 5: VISTA GIRL folded on the 3rd Street (didn't bet)
Seat 6: br1an showed [4c 7d 2d Qh 6d 6h 2h] and lost with HI: two pair, Sixes and Deuces
Seat 7: steffen780 folded on the 5th Street
Seat 8: willowdale showed [3s 4d 5s 4s Ad 5h 2c] and won ($1.02) with HI: a straight, Ace to Five; LO: 5,4,3,2,A

View File

@ -0,0 +1,43 @@
Connected to MySQL on localhost. Print Hand Utility
options.site: PokerStars siteId: 2
From Table Hands
================
handId: 5 tableName: Lydia siteHandNo: 15043388146 gametypeId: 3 handStart: 2008-02-04 03:04:15 seats: 6 maxSeats: 8
From Table Gametypes
====================
type: ring base: stud category: studhilo limitType: fl hiLo: s
sbet: 10 bbet: 20
From Table BoardCards
=====================
From Table HandsPlayers
=======================
playerName:olimpicon99 playerStartcash:531 ante:2 cards:?? ?? 8c ?? ?? ?? ?? winnings:0 rake:0
playerName:PokerPig55 playerStartcash:158 ante:2 cards:?? ?? Kh ?? ?? ?? ?? winnings:0 rake:0
playerName:VISTA GIRL playerStartcash:83 ante:2 cards:?? ?? 8h ?? ?? ?? ?? winnings:0 rake:0
playerName:br1an playerStartcash:510 ante:2 cards:4c 7d 2d Qh 6d 6h 2h winnings:0 rake:0
playerName:steffen780 playerStartcash:400 ante:2 cards:Kc 9h 9c 5c 8s ?? ?? winnings:0 rake:0
playerName:willowdale playerStartcash:392 ante:2 cards:3s 4d 5s 4s Ad 5h 2c winnings:102 rake:5
From Table HandsActions
=======================
playerName:olimpicon99 street:0 streetActionNo:3 action:fold amount:0
playerName:PokerPig55 street:0 streetActionNo:4 action:fold amount:0
playerName:VISTA GIRL street:0 streetActionNo:5 action:fold amount:0
playerName:br1an street:0 streetActionNo:0 action:blind amount:5
playerName:br1an street:1 streetActionNo:0 action:check amount:0
playerName:br1an street:2 streetActionNo:1 action:call amount:20
playerName:br1an street:3 streetActionNo:0 action:check amount:0
playerName:br1an street:4 streetActionNo:0 action:check amount:0
playerName:br1an street:4 streetActionNo:2 action:call amount:20
playerName:steffen780 street:0 streetActionNo:1 action:call amount:5
playerName:steffen780 street:1 streetActionNo:1 action:check amount:0
playerName:steffen780 street:2 streetActionNo:2 action:fold amount:0
playerName:willowdale street:0 streetActionNo:2 action:call amount:5
playerName:willowdale street:1 streetActionNo:2 action:check amount:0
playerName:willowdale street:2 streetActionNo:0 action:bet amount:20
playerName:willowdale street:3 streetActionNo:1 action:check amount:0
playerName:willowdale street:4 streetActionNo:1 action:bet amount:20

View File

@ -20,11 +20,8 @@ echo "Please note for this to work you need to work on an empty database, otherw
rm *.found.txt
../pyfpdb/fpdb_import.py -p$1 --file=ps-lhe-ring-3hands.txt -x
../pyfpdb/fpdb_import.py -p$1 --file=ps-lhe-ring-3hands.txt -x
#../pyfpdb/fpdb_import.py -p$1 --file=ftp-stud-hilo-ring-001.txt -x
#../pyfpdb/fpdb_import.py -p$1 --file=ftp-omaha-hi-pl-ring-001-005.txt -x
echo "it should've reported first that it stored 3, then that it had 3 duplicates"
#echo " then 1 stored, then 5 stored"
./PrintHand.py -p$1 --hand=14519394979 > ps.14519394979.found.txt && colordiff ps.14519394979.found.txt ps.14519394979.expected.txt
./PrintHand.py -p$1 --hand=14519420999 > ps.14519420999.found.txt && colordiff ps.14519420999.found.txt ps.14519420999.expected.txt
@ -36,14 +33,13 @@ echo "it should've reported first that it stored 3, then that it had 3 duplicate
../pyfpdb/fpdb_import.py -p$1 --file=ps-lhe-ring-call-3B-preflop-cb-no2b.txt -x
echo "it should've now reported another successful store of 1 hand"
./PrintPlayerHudData.py -p$1 -nplayer3 -oE -e10 -b25 > ps-flags-CBflop.found.txt && colordiff ps-flags-CBflop.found.txt ps-flags-CBflop.expected.txt
./PrintPlayerHudData.py -p$1 -nplayer3 -oE -e10 -b50 > ps-flags-CBflop.found.txt && colordiff ps-flags-CBflop.found.txt ps-flags-CBflop.expected.txt
#./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6367428246 > ftp.6367428246.found.txt && colordiff ftp.6367428246.found.txt ftp.6367428246.expected.txt
#./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6929537410 > ftp.6929537410.found.txt && colordiff ftp.6929537410.found.txt ftp.6929537410.expected.txt
#./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6929553738 > ftp.6929553738.found.txt && colordiff ftp.6929553738.found.txt ftp.6929553738.expected.txt
#./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6929572212 > ftp.6929572212.found.txt && colordiff ftp.6929572212.found.txt ftp.6929572212.expected.txt
#./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6929576743 > ftp.6929576743.found.txt && colordiff ftp.6929576743.found.txt ftp.6929576743.expected.txt
#./print_hand.py -p$1 --site="Full Tilt Poker" --hand=6929587483 > ftp.6929587483.found.txt && colordiff ftp.6929587483.found.txt ftp.6929587483.expected.txt
../pyfpdb/fpdb_import.py -p$1 --file=ps-studhilo-ring-showdown.txt -x
echo "it should've now reported another successful store of 1 hand"
./PrintHand.py -p$1 --hand=15043388146 > ps.15043388146.found.txt && colordiff ps.15043388146.found.txt ps.15043388146.expected.txt
./PrintPlayerHudData.py -p$1 -nbr1an -o0 -e6 -b20 -cstudhilo> ps-flags-studhilo.found.txt && colordiff ps-flags-studhilo.found.txt ps-flags-studhilo.expected.txt
echo "if everything was printed as expected this worked"