git10 - added field to table design that i had neglected to document. apologies. renamed it as well to be more useful, its now PF3B4BChance. more table design cleaning.

finished PrintPlayerFlags and renamed to the more appropriate PrintPlayerHudData
fixed: imp/tv bug: PFR is blatantly crazy
moved the scripts that do regression testing into the testdata directory and renamed that into regression-test
This commit is contained in:
steffen123
2008-08-05 00:14:17 +01:00
parent 2ed82c58ee
commit 84b3851cb5
20 changed files with 120 additions and 92 deletions
+100
View File
@@ -0,0 +1,100 @@
#!/usr/bin/python
#Copyright 2008 Steffen Jobbagy-Felso
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU Affero General Public License as published by
#the Free Software Foundation, version 3 of the License.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU Affero General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>.
#In the "official" distribution you can find the license in
#agpl-3.0.txt in the docs folder of the package.
#This is intended mostly for regression testing
import sys
import MySQLdb
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("-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)")
parser.add_option("-l", "--limit", "--limitType", default="fl", help="Limit Type, one of: nl, pl, fl, cn, cp")
parser.add_option("-n", "--name", "--playername", default="Player_1", help="Name of the player to print")
parser.add_option("-p", "--password", help="The password for the MySQL user")
parser.add_option("-s", "--site", default="PokerStars", help="Name of the site (as written in the history files)")
(options, sys.argv) = parser.parse_args()
db = MySQLdb.connect("localhost", "fpdb", options.password, "fpdb")
cursor = db.cursor()
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
cursor.execute("SELECT id FROM sites WHERE name=%s", (options.site,))
siteId=cursor.fetchone()[0]
cursor.execute("SELECT id FROM gametypes WHERE big_blind=%s AND category=%s AND site_id=%s AND limit_type=%s AND type=%s", (options.bigblind, 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 HudDataHoldemOmaha WHERE gametypeId=%s AND playerId=%s AND activeSeats=%s",(gametypeId, playerId, options.seats))
hudDataId=cursor.fetchone()[0]
print "siteId:", siteId, "gametypeId:", gametypeId, "playerId:", playerId, "hudDataId:", hudDataId
print ""
print "HUD Raw Hand Counts"
print "==================="
cursor.execute ("SELECT HDs, VPIP, PFR, PF3B4BChance, PF3B4B FROM HudDataHoldemOmaha WHERE id=%s", (hudDataId,))
fields=cursor.fetchone()
print "HDs:",fields[0]
print "VPIP:",fields[1]
print "PFR:",fields[2]
print "PF3B4BChance:",fields[3]
print "PF3B4B:",fields[4]
print ""
cursor.execute ("SELECT sawFlop, sawTurn, sawRiver, sawShowdown FROM HudDataHoldemOmaha WHERE id=%s", (hudDataId,))
fields=cursor.fetchone()
print "sawFlop:",fields[0]
print "sawTurn:",fields[1]
print "sawRiver:",fields[2]
print "sawShowdown:",fields[3]
print ""
cursor.execute ("SELECT raisedFlop, raisedTurn, raisedRiver FROM HudDataHoldemOmaha WHERE id=%s", (hudDataId,))
fields=cursor.fetchone()
print "raisedFlop:",fields[0]
print "raisedTurn:",fields[1]
print "raisedRiver:",fields[2]
print ""
cursor.execute ("SELECT otherRaisedFlop, otherRaisedFlopFold, otherRaisedTurn, otherRaisedTurnFold, otherRaisedRiver, otherRaisedRiverFold FROM HudDataHoldemOmaha WHERE id=%s", (hudDataId,))
fields=cursor.fetchone()
print "otherRaisedFlop:",fields[0]
print "otherRaisedFlopFold:",fields[1]
print "otherRaisedTurn:",fields[2]
print "otherRaisedTurnFold:",fields[3]
print "otherRaisedRiver:",fields[4]
print "otherRaisedRiverFold:",fields[5]
cursor.close()
db.close()
sys.exit(0)
+79
View File
@@ -0,0 +1,79 @@
#!/usr/bin/python
#Copyright 2008 Steffen Jobbagy-Felso
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU Affero General Public License as published by
#the Free Software Foundation, version 3 of the License.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU Affero General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>.
#In the "official" distribution you can find the license in
#agpl-3.0.txt in the docs folder of the package.
import sys
def cards2String(arr):
if (len(arr)%2!=0):
print "TODO: raise error, cards2String failed, uneven length of arr"
sys.exit(1)
result = ""
for i in range (len(arr)/2):
if arr[i*2]==0:
result+="??"
else:
if arr[i*2]==14:
result+="A"
elif arr[i*2]==13:
result+="K"
elif arr[i*2]==12:
result+="Q"
elif arr[i*2]==11:
result+="J"
elif arr[i*2]==10:
result+="T"
elif (arr[i*2]>=2 and arr[i*2]<=9):
result+=str(arr[i*2])
else:
print "TODO: raise error, cards2String failed, arr[i*2]:",arr[i*2]
sys.exit(1)
result+=arr[i*2+1]
result+=" "
return result[:-1]
def id_to_player_name(cursor, id):
cursor.execute("SELECT name FROM players WHERE id=%s", (id, ))
return cursor.fetchone()[0]
def position2String(pos):
if pos=="B":
return "BB"
elif pos=="S":
return "SB"
elif pos=="0":
return "Btn"
else:
return (pos+" off Btn")
def street_int2String(category, street):
if (category=="holdem" or category=="omahahi" or category=="omahahilo"):
if street==0:
return "Preflop"
elif street==1:
return "Flop"
elif street==2:
return "Turn"
elif street==3:
return "River"
else:
print "TODO: raise error, fpdb_util_lib.py street_int2String invalid street no"
sys.exit(1)
elif (category=="razz" or category=="studhi" or category=="studhilo"):
return str(street)
else:
print "TODO: raise error, fpdb_util_lib.py street_int2String invalid category"
sys.exit(1)
@@ -0,0 +1,271 @@
Full Tilt Poker Game #6929537410: Table Green (deep) - $0.50/$1 - Pot Limit Omaha Hi - 17:15:44 ET - 2008/06/22
Seat 1: player16 ($94.90)
Seat 2: player25 ($147)
Seat 3: player18 ($62.80)
Seat 4: player19 ($136.55)
Seat 5: play-er26 ($56.05)
Seat 6: player21 ($252.95)
Seat 7: player22 ($200)
Seat 8: player23 ($162.50)
Seat 9: player24 ($270.70)
player24 posts the small blind of $0.50
player16 posts the big blind of $1
player22 posts $1
The button is in seat #8
*** HOLE CARDS ***
player25 folds
player25 stands up
player18 folds
player19 folds
play-er26 folds
player21 folds
player22 checks
player23 calls $1
player17 adds $100
player24 calls $0.50
player16 checks
*** FLOP *** [4s Kc 8s]
player24 has 15 seconds left to act
player24 checks
player16 checks
player22 checks
player23 checks
*** TURN *** [4s Kc 8s] [6s]
player24 checks
player16 checks
player22 checks
player23 bets $4
player24 calls $4
player16 folds
player22 folds
*** RIVER *** [4s Kc 8s 6s] [Qc]
player24 checks
player23 checks
*** SHOW DOWN ***
player23 shows [Td 5s 3d Js] a flush, Jack high
player24 mucks
player23 wins the pot ($11.40) with a flush, Jack high
*** SUMMARY ***
Total pot $12 | Rake $0.60
Board: [4s Kc 8s 6s Qc]
Seat 1: player16 (big blind) folded on the Turn
Seat 2: player25 didn't bet (folded)
Seat 3: player18 didn't bet (folded)
Seat 4: player19 didn't bet (folded)
Seat 5: play-er26 didn't bet (folded)
Seat 6: player21 didn't bet (folded)
Seat 7: player22 folded on the Turn
Seat 8: player23 (button) collected ($11.40)
Seat 9: player24 (small blind) mucked
Full Tilt Poker Game #6929553738: Table Green (deep) - $0.50/$1 - Pot Limit Omaha Hi - 17:17:06 ET - 2008/06/22
Seat 1: player16 ($93.90)
Seat 2: player17 ($100)
Seat 3: player18 ($62.80)
Seat 4: player19 ($136.55)
Seat 5: play-er26 ($56.05)
Seat 6: player21 ($252.95)
Seat 7: player22 ($199)
Seat 8: player23 ($168.90)
Seat 9: player24 ($265.70)
player16 posts the small blind of $0.50
player17 posts the big blind of $1
The button is in seat #9
*** HOLE CARDS ***
player18 folds
play-er26 stands up
player19 raises to $2
play-er26 folds
player21 calls $2
player22 has 15 seconds left to act
player22 folds
player23 folds
player24 folds
player16 calls $1.50
player17 calls $1
*** FLOP *** [Jc 4c Kc]
player16 checks
player17 checks
player19 checks
player21 checks
*** TURN *** [Jc 4c Kc] [7h]
player16 checks
player17 checks
player19 bets $3.50
player21 folds
player16 folds
player17 calls $3.50
*** RIVER *** [Jc 4c Kc 7h] [8s]
player17 checks
player19 has 15 seconds left to act
player19 bets $10
player17 calls $10
*** SHOW DOWN ***
player19 shows [4s Tc As Ac] a flush, Ace high
player17 mucks
player19 wins the pot ($33.25) with a flush, Ace high
*** SUMMARY ***
Total pot $35 | Rake $1.75
Board: [Jc 4c Kc 7h 8s]
Seat 1: player16 (small blind) folded on the Turn
Seat 2: player17 (big blind) mucked
Seat 3: player18 didn't bet (folded)
Seat 4: player19 collected ($33.25)
Seat 5: play-er26 didn't bet (folded)
Seat 6: player21 folded on the Turn
Seat 7: player22 didn't bet (folded)
Seat 8: player23 didn't bet (folded)
Seat 9: player24 (button) didn't bet (folded)
Full Tilt Poker Game #6929572212: Table Green (deep) - $0.50/$1 - Pot Limit Omaha Hi - 17:18:40 ET - 2008/06/22
Seat 1: player16 ($91.90)
Seat 2: player17 ($84.50)
Seat 3: player18 ($62.80)
Seat 4: player19 ($154.30)
Seat 6: player21 ($250.95)
Seat 7: player22 ($199)
Seat 8: player23 ($168.90)
Seat 9: player24 ($265.70)
player17 posts the small blind of $0.50
player18 posts the big blind of $1
The button is in seat #1
*** HOLE CARDS ***
player19 folds
player21 folds
player20 adds $50
player22 folds
player23 folds
player24 folds
player20 is sitting out
player16 raises to $2
player17 folds
player18 folds
Uncalled bet of $1 returned to player16
player16 mucks
player16 wins the pot ($2.50)
*** SUMMARY ***
Total pot $2.50 | Rake $0
Seat 1: player16 (button) collected ($2.50), mucked
Seat 2: player17 (small blind) folded before the Flop
Seat 3: player18 (big blind) folded before the Flop
Seat 4: player19 didn't bet (folded)
Seat 6: player21 didn't bet (folded)
Seat 7: player22 didn't bet (folded)
Seat 8: player23 didn't bet (folded)
Seat 9: player24 didn't bet (folded)
Full Tilt Poker Game #6929576743: Table Green (deep) - $0.50/$1 - Pot Limit Omaha Hi - 17:19:03 ET - 2008/06/22
Seat 1: player16 ($93.40)
Seat 2: player17 ($84)
Seat 3: player18 ($61.80)
Seat 4: player19 ($154.30)
Seat 5: player20 ($50), is sitting out
Seat 6: player21 ($250.95)
Seat 7: player22 ($199)
Seat 8: player23 ($168.90)
Seat 9: player24 ($265.70)
player18 posts the small blind of $0.50
player19 posts the big blind of $1
The button is in seat #2
*** HOLE CARDS ***
player20 has returned
player21 calls $1
player22 folds
player23 calls $1
player24 calls $1
player16 raises to $4
player17 folds
player18 folds
player19 folds
player21 folds
player23 folds
player17 is sitting out
player24 has 15 seconds left to act
player24 calls $3
*** FLOP *** [Tc 9s 7h]
player24 checks
player16 has 15 seconds left to act
player16 bets $8
player24 folds
Uncalled bet of $8 returned to player16
player16 mucks
player16 wins the pot ($10.95)
*** SUMMARY ***
Total pot $11.50 | Rake $0.55
Board: [Tc 9s 7h]
Seat 1: player16 collected ($10.95), mucked
Seat 2: player17 (button) didn't bet (folded)
Seat 3: player18 (small blind) folded before the Flop
Seat 4: player19 (big blind) folded before the Flop
Seat 5: player20 is sitting out
Seat 6: player21 folded before the Flop
Seat 7: player22 didn't bet (folded)
Seat 8: player23 folded before the Flop
Seat 9: player24 folded on the Flop
Full Tilt Poker Game #6929587483: Table Green (deep) - $0.50/$1 - Pot Limit Omaha Hi - 17:19:57 ET - 2008/06/22
Seat 1: player16 ($100.35)
Seat 2: player17 ($84), is sitting out
Seat 3: player18 ($61.30)
Seat 4: player19 ($153.30)
Seat 5: player20 ($50)
Seat 6: player21 ($249.95)
Seat 7: player22 ($199)
Seat 8: player23 ($167.90)
Seat 9: player24 ($261.70)
player19 posts the small blind of $0.50
player20 posts the big blind of $1
The button is in seat #3
*** HOLE CARDS ***
player21 folds
player22 folds
player21 stands up
player23 calls $1
player24 calls $1
player16 folds
player18 folds
player19 calls $0.50
player20 checks
*** FLOP *** [Jd Td 2c]
roguern adds $100
player19 bets $3
player20 folds
player23 folds
player24 has 15 seconds left to act
player24 raises to $11
player19 raises to $37
player24 raises to $115
player19 raises to $152.30, and is all in
player24 calls $37.30
player19 shows [Jc Jh 7s 5h]
player24 shows [Kh Ad 6h Qd]
*** TURN *** [Jd Td 2c] [As]
*** RIVER *** [Jd Td 2c As] [8s]
player19 shows three of a kind, Jacks
player24 shows a straight, Ace high
player24 wins the pot ($305.60) with a straight, Ace high
player19 is sitting out
*** SUMMARY ***
Total pot $308.60 | Rake $3
Board: [Jd Td 2c As 8s]
Seat 1: player16 didn't bet (folded)
Seat 2: player17 is sitting out
Seat 3: player18 (button) didn't bet (folded)
Seat 4: player19 (small blind) showed [Jc Jh 7s 5h] and lost with three of a kind, Jacks
Seat 5: player20 (big blind) folded on the Flop
Seat 6: player21 didn't bet (folded)
Seat 7: player22 didn't bet (folded)
Seat 8: player23 folded on the Flop
Seat 9: player24 showed [Kh Ad 6h Qd] and won ($305.60) with a straight, Ace high
@@ -0,0 +1,61 @@
Full Tilt Poker Game #6367428246: Table Mountain Mesa - $15/$30 Ante $3 - Limit Stud H/L - 23:47:38 ET - 2008/05/10
Seat 1: Player_8 ($446), is sitting out
Seat 2: Play er9 ($303.50)
Seat 3: P layer10 ($613), is sitting out
Seat 4: Player_11 ($164)
Seat 5: Player1 2 ($543.50), is sitting out
Seat 6: Player13 ($912.50)
Seat 7: Player14 ($430), is sitting out
Seat 8: Player15 ($531.50)
Player15 antes $3
Player_11 antes $3
Player13 antes $3
Play er9 antes $3
*** 3RD STREET ***
Dealt to Play er9 [2s]
Dealt to Player_11 [3c]
Dealt to Player13 [8c]
Dealt to Player15 [Jc]
Play er9 is low with [2s]
Play er9 brings in for $5
Player_11 folds
Player13 completes it to $15
Player15 folds
Play er9 calls $10
*** 4TH STREET ***
Dealt to Play er9 [2s] [6c]
Dealt to Player13 [8c] [5h]
Player13 bets $15
Play er9 calls $15
*** 5TH STREET ***
Dealt to Play er9 [2s 6c] [Ac]
Dealt to Player13 [8c 5h] [Ah]
Player13 bets $30
Play er9 calls $30
*** 6TH STREET ***
Dealt to Play er9 [2s 6c Ac] [2c]
Dealt to Player13 [8c 5h Ah] [Jd]
Play er9 bets $30
Player13 calls $30
*** 7TH STREET ***
Play er9 bets $30
Player13 calls $30
*** SHOW DOWN ***
Play er9 shows [5c 4h 2s 6c Ac 2c 2h] three of a kind, Twos, for high and 6,5,4,2,A, for low
Player13 mucks
Play er9 wins the high pot ($125) with three of a kind, Twos
Play er9 wins the low pot ($125) with 6,5,4,2,A
*** SUMMARY ***
Total pot $252 | Rake $2
Seat 1: Player_8 is sitting out
Seat 2: Play er9 collected ($250)
Seat 3: P layer10 is sitting out
Seat 4: Player_11 folded on 3rd St.
Seat 5: Player1 2 is sitting out
Seat 6: Player13 mucked
Seat 7: Player14 is sitting out
Seat 8: Player15 folded on 3rd St.
@@ -0,0 +1,38 @@
Connected to MySQL on localhost. Print Hand Utility
options.site: Full Tilt Poker site_id: 1
From Table sites
====================
site_name: Full Tilt Poker
From Table gametypes
====================
type: category: studhilo limit_type:
sb: bb: sbet: bbet:
From Table hands
================
site_hand_no: 6367428246 hand_start: 2008-05-11 04:47:38 seat_count: 4
From Table hands_players
========================
player_name:Play er9 player_startcash:30350 ante:300 cards:5c 4h 2s 6c Ac 2c 2h winnings:25000 rake:200
player_name:Player_11 player_startcash:16400 ante:300 cards:?? ?? 3c ?? ?? ?? ?? winnings:0 rake:0
player_name:Player13 player_startcash:91250 ante:300 cards:?? ?? 8c 5h Ah Jd ?? winnings:0 rake:0
player_name:Player15 player_startcash:53150 ante:300 cards:?? ?? Jc ?? ?? ?? ?? winnings:0 rake:0
From Table hands_actions
========================
player_name:Play er9 actionCount:0 street:3 streetActionNo:0 action:blind amount:500
player_name:Play er9 actionCount:1 street:3 streetActionNo:1 action:call amount:1000
player_name:Play er9 actionCount:2 street:4 streetActionNo:0 action:call amount:1500
player_name:Play er9 actionCount:3 street:5 streetActionNo:0 action:call amount:3000
player_name:Play er9 actionCount:4 street:6 streetActionNo:0 action:bet amount:3000
player_name:Play er9 actionCount:5 street:7 streetActionNo:0 action:bet amount:3000
player_name:Player_11 actionCount:0 street:3 streetActionNo:0 action:fold amount:0
player_name:Player13 actionCount:0 street:3 streetActionNo:0 action:bet amount:1500
player_name:Player13 actionCount:1 street:4 streetActionNo:0 action:bet amount:1500
player_name:Player13 actionCount:2 street:5 streetActionNo:0 action:bet amount:3000
player_name:Player13 actionCount:3 street:6 streetActionNo:0 action:call amount:3000
player_name:Player13 actionCount:4 street:7 streetActionNo:0 action:call amount:3000
player_name:Player15 actionCount:0 street:3 streetActionNo:0 action:fold amount:0
@@ -0,0 +1,46 @@
Connected to MySQL on localhost. Print Hand Utility
options.site: Full Tilt Poker site_id: 1
From Table hands
================
site_hand_no: 6929537410 hand_start: 2008-06-22 22:15:44 seat_count: 9 category: omahahi
Board cards: 4s Kc 8s 6s Qc
From Table hands_players
========================
player_name:player16 player_startcash:9490 position:BB cards:?? ?? ?? ?? winnings:0 rake:0
player_name:player25 player_startcash:14700 position:6 off Btn cards:?? ?? ?? ?? winnings:0 rake:0
player_name:player18 player_startcash:6280 position:5 off Btn cards:?? ?? ?? ?? winnings:0 rake:0
player_name:player19 player_startcash:13655 position:4 off Btn cards:?? ?? ?? ?? winnings:0 rake:0
player_name:play-er26 player_startcash:5605 position:3 off Btn cards:?? ?? ?? ?? winnings:0 rake:0
player_name:player21 player_startcash:25295 position:2 off Btn cards:?? ?? ?? ?? winnings:0 rake:0
player_name:player22 player_startcash:20000 position:1 off Btn cards:?? ?? ?? ?? winnings:0 rake:0
player_name:player23 player_startcash:16250 position:Btn cards:Td 5s 3d Js winnings:1140 rake:60
player_name:player24 player_startcash:27070 position:SB cards:?? ?? ?? ?? winnings:0 rake:0
From Table hands_actions
========================
player_name:player16 actionCount:0 street:Preflop streetActionNo:0 action:blind amount:100
player_name:player16 actionCount:1 street:Preflop streetActionNo:1 action:check amount:0
player_name:player16 actionCount:2 street:Flop streetActionNo:0 action:check amount:0
player_name:player16 actionCount:3 street:Turn streetActionNo:0 action:check amount:0
player_name:player16 actionCount:4 street:Turn streetActionNo:1 action:fold amount:0
player_name:player25 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
player_name:player18 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
player_name:player19 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
player_name:play-er26 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
player_name:player21 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
player_name:player22 actionCount:0 street:Preflop streetActionNo:0 action:blind amount:100
player_name:player22 actionCount:1 street:Preflop streetActionNo:1 action:check amount:0
player_name:player22 actionCount:2 street:Flop streetActionNo:0 action:check amount:0
player_name:player22 actionCount:3 street:Turn streetActionNo:0 action:check amount:0
player_name:player22 actionCount:4 street:Turn streetActionNo:1 action:fold amount:0
player_name:player23 actionCount:0 street:Preflop streetActionNo:0 action:call amount:100
player_name:player23 actionCount:1 street:Flop streetActionNo:0 action:check amount:0
player_name:player23 actionCount:2 street:Turn streetActionNo:0 action:bet amount:400
player_name:player23 actionCount:3 street:River streetActionNo:0 action:check amount:0
player_name:player24 actionCount:0 street:Preflop streetActionNo:0 action:blind amount:50
player_name:player24 actionCount:1 street:Preflop streetActionNo:1 action:call amount:50
player_name:player24 actionCount:2 street:Flop streetActionNo:0 action:check amount:0
player_name:player24 actionCount:3 street:Turn streetActionNo:0 action:check amount:0
player_name:player24 actionCount:4 street:Turn streetActionNo:1 action:call amount:400
player_name:player24 actionCount:5 street:River streetActionNo:0 action:check amount:0
@@ -0,0 +1,45 @@
Connected to MySQL on localhost. Print Hand Utility
options.site: Full Tilt Poker site_id: 1
From Table hands
================
site_hand_no: 6929553738 hand_start: 2008-06-22 22:17:06 seat_count: 9 category: omahahi
Board cards: Jc 4c Kc 7h 8s
From Table hands_players
========================
player_name:player16 player_startcash:9390 position:SB cards:?? ?? ?? ?? winnings:0 rake:0
player_name:player17 player_startcash:10000 position:BB cards:?? ?? ?? ?? winnings:0 rake:0
player_name:player18 player_startcash:6280 position:6 off Btn cards:?? ?? ?? ?? winnings:0 rake:0
player_name:player19 player_startcash:13655 position:5 off Btn cards:4s Tc As Ac winnings:3325 rake:175
player_name:play-er26 player_startcash:5605 position:4 off Btn cards:?? ?? ?? ?? winnings:0 rake:0
player_name:player21 player_startcash:25295 position:3 off Btn cards:?? ?? ?? ?? winnings:0 rake:0
player_name:player22 player_startcash:19900 position:2 off Btn cards:?? ?? ?? ?? winnings:0 rake:0
player_name:player23 player_startcash:16890 position:1 off Btn cards:?? ?? ?? ?? winnings:0 rake:0
player_name:player24 player_startcash:26570 position:Btn cards:?? ?? ?? ?? winnings:0 rake:0
From Table hands_actions
========================
player_name:player16 actionCount:0 street:Preflop streetActionNo:0 action:blind amount:50
player_name:player16 actionCount:1 street:Preflop streetActionNo:1 action:call amount:150
player_name:player16 actionCount:2 street:Flop streetActionNo:0 action:check amount:0
player_name:player16 actionCount:3 street:Turn streetActionNo:0 action:check amount:0
player_name:player16 actionCount:4 street:Turn streetActionNo:1 action:fold amount:0
player_name:player17 actionCount:0 street:Preflop streetActionNo:0 action:blind amount:100
player_name:player17 actionCount:1 street:Preflop streetActionNo:1 action:call amount:100
player_name:player17 actionCount:2 street:Flop streetActionNo:0 action:check amount:0
player_name:player17 actionCount:3 street:Turn streetActionNo:0 action:check amount:0
player_name:player17 actionCount:4 street:Turn streetActionNo:1 action:call amount:350
player_name:player17 actionCount:5 street:River streetActionNo:0 action:check amount:0
player_name:player17 actionCount:6 street:River streetActionNo:1 action:call amount:1000
player_name:player18 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
player_name:player19 actionCount:0 street:Preflop streetActionNo:0 action:bet amount:200
player_name:player19 actionCount:1 street:Flop streetActionNo:0 action:check amount:0
player_name:player19 actionCount:2 street:Turn streetActionNo:0 action:bet amount:350
player_name:player19 actionCount:3 street:River streetActionNo:0 action:bet amount:1000
player_name:play-er26 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
player_name:player21 actionCount:0 street:Preflop streetActionNo:0 action:call amount:200
player_name:player21 actionCount:1 street:Flop streetActionNo:0 action:check amount:0
player_name:player21 actionCount:2 street:Turn streetActionNo:0 action:fold amount:0
player_name:player22 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
player_name:player23 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
player_name:player24 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
File diff suppressed because one or more lines are too long
+169
View File
@@ -0,0 +1,169 @@
#!/usr/bin/python
#Copyright 2008 Steffen Jobbagy-Felso
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU Affero General Public License as published by
#the Free Software Foundation, version 3 of the License.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU Affero General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>.
#In the "official" distribution you can find the license in
#agpl-3.0.txt in the docs folder of the package.
#This is intended mostly for regression testing
import sys
import MySQLdb
from optparse import OptionParser
import fpdb_util_lib as ful
parser = OptionParser()
parser.add_option("-n", "--hand_number", "--hand", type="int",
help="Number of the hand to print")
parser.add_option("-p", "--password", help="The password for the MySQL user")
parser.add_option("-s", "--site", default="PokerStars",
help="Name of the site (as written in the history files)")
(options, sys.argv) = parser.parse_args()
if options.hand_number==None or options.site==None:
print "please supply a hand number and site name. TODO: make this work"
db = MySQLdb.connect("localhost", "fpdb", options.password, "fpdb")
cursor = db.cursor()
print "Connected to MySQL on localhost. Print Hand Utility"
cursor.execute("SELECT id FROM sites WHERE name=%s", (options.site,))
site_id=cursor.fetchone()[0]
print "options.site:",options.site,"site_id:",site_id
cursor.execute("""SELECT hands.* FROM hands INNER JOIN gametypes
ON hands.gametype_id = gametypes.id WHERE gametypes.site_id=%s AND hands.site_hand_no=%s""",
(site_id, options.hand_number))
hands_result=cursor.fetchone()
gametype_id=hands_result[2]
site_hand_no=options.hand_number
hand_id=hands_result[0]
hand_start=hands_result[3]
seat_count=hands_result[4]
print ""
print "From Table gametypes"
print "===================="
cursor.execute("""SELECT type, category, limit_type FROM gametypes WHERE id=%s""",
(gametype_id, ))
type_etc=cursor.fetchone()
type=type_etc[0]
category=type_etc[1]
limit_type=type_etc[2]
print "type:", type, " category:", category, " limit_type:", limit_type
gt_string=""
do_bets=False
if (category=="holdem" or category=="omahahi" or category=="omahahilo"):
cursor.execute("SELECT small_blind FROM gametypes WHERE id=%s", (gametype_id, ))
sb=cursor.fetchone()[0]
cursor.execute("SELECT big_blind FROM gametypes WHERE id=%s", (gametype_id, ))
bb=cursor.fetchone()[0]
gt_string=("sb: "+str(sb)+" bb: "+str(bb))
if (limit_type=="fl"):
do_bets=True
elif (category=="razz" or category=="studhi" or category=="studhilo"):
do_bets=True
if do_bets:
cursor.execute("SELECT small_bet FROM gametypes WHERE id=%s", (gametype_id, ))
sbet=cursor.fetchone()[0]
cursor.execute("SELECT big_bet FROM gametypes WHERE id=%s", (gametype_id, ))
bbet=cursor.fetchone()[0]
gt_string+=(" sbet: "+str(sbet)+" bbet: "+str(bbet))
print gt_string
if type=="ring":
pass
elif type=="tour":
#cursor.execute("SELECT tourneys_players_id FROM hands
cursor.execute("""SELECT DISTINCT tourneys_players.id
FROM hands JOIN hands_players ON hands_players.hand_id=hands.id
JOIN tourneys_players ON hands_players.tourneys_players_id=tourneys_players.id
WHERE hands.id=%s""", (hand_id,))
hands_players_ids=cursor.fetchall()
print "dbg hands_players_ids:",hands_players_ids
print ""
print "From Table tourneys"
print "==================="
print "TODO"
print ""
print "From Table tourneys_players"
print "==========================="
print "TODO"
else:
print "invalid type:",type
sys.exit(1)
print ""
print "From Table hands"
print "================"
print "site_hand_no:",site_hand_no,"hand_start:",hand_start,"seat_count:",seat_count
#,"hand_id:",hand_id,"gametype_id:",gametype_id
if (category=="holdem" or category=="omahahi" or category=="omahahilo"):
cursor.execute("""SELECT * FROM board_cards WHERE hand_id=%s""",(hand_id, ))
bc=cursor.fetchone()
print "Board cards:", ful.cards2String(bc[2:])
print ""
print "From Table hands_players"
print "========================"
cursor.execute("""SELECT * FROM hands_players WHERE hand_id=%s""",(hand_id, ))
hands_players=cursor.fetchall()
player_names=[]
for i in range (len(hands_players)):
line=hands_players[i][2:]
player_names.append(ful.id_to_player_name(cursor, line[0]))
printstr="player_name:"+player_names[i]+" player_startcash:"+str(line[1])
if (category=="holdem" or category=="omahahi" or category=="omahahilo"):
printstr+=" position:"+ful.position2String(line[2])+" cards:"
if (category=="holdem"):
printstr+=ful.cards2String(line[4:8])
else:
printstr+=ful.cards2String(line[4:12])
elif (category=="razz" or category=="studhi" or category=="studhilo"):
printstr+=" ante:"+str(line[3])+" cards:"
printstr+=ful.cards2String(line[4:18])
else:
print "TODO: raise error, print_hand.py"
sys.exit(1)
printstr+=" winnings:"+str(line[18])+" rake:"+str(line[19])
print printstr
print ""
print "From Table hands_actions"
print "========================"
for i in range (len(hands_players)):
cursor.execute("""SELECT * FROM hands_actions WHERE hand_player_id=%s""",(hands_players[i][0], ))
hands_actions=cursor.fetchall()
for j in range (len(hands_actions)):
line=hands_actions[j][2:]
printstr="player_name:"+player_names[i]+" actionCount:"+str(j)
printstr+=" street:"+ful.street_int2String(category, line[0])+" streetActionNo:"+str(line[1])+" action:"+line[2]
printstr+=" amount:"+str(line[3])
print printstr
cursor.close()
db.close()
sys.exit(0)
+169
View File
@@ -0,0 +1,169 @@
PokerStars Game #14519394979: Hold'em Limit ($0.02/$0.04) - 2008/01/13 - 00:22:15 (ET)
Table 'Merope' 10-max Seat #1 is the button
Seat 1: Player_1 ($0.75 in chips)
Seat 3: Player_2 ($0.59 in chips)
Seat 4: Player_3 ($1.47 in chips)
Seat 6: Player_4 ($1.98 in chips)
Seat 7: Player_5 ($1.22 in chips)
Seat 8: Player_6 ($0.48 in chips)
Seat 9: Player_7 ($1.39 in chips)
Player_2: posts small blind $0.01
Player_3: posts big blind $0.02
*** HOLE CARDS ***
Dealt to Player_7 [Ts Jh]
Player_4: raises $0.02 to $0.04
Player_5: folds
Player_6: folds
Player_7: folds
Player_1: calls $0.04
Player_2: calls $0.03
Player_3: folds
*** FLOP *** [Qd Th Js]
Player_2: checks
Player_4: bets $0.02
Player_1: calls $0.02
Player_2: calls $0.02
*** TURN *** [Qd Th Js] [2s]
Player_2: checks
Player_4: bets $0.04
Player_1: calls $0.04
Player_2: calls $0.04
*** RIVER *** [Qd Th Js 2s] [7s]
Player_2: checks
Player_4: bets $0.04
Player_1: folds
Player_2: folds
Player_4 collected $0.31 from pot
*** SUMMARY ***
Total pot $0.32 | Rake $0.01
Board [Qd Th Js 2s 7s]
Seat 1: Player_1 (button) folded on the River
Seat 3: Player_2 (small blind) folded on the River
Seat 4: Player_3 (big blind) folded before Flop
Seat 6: Player_4 collected ($0.31)
Seat 7: Player_5 folded before Flop (didn't bet)
Seat 8: Player_6 folded before Flop (didn't bet)
Seat 9: Player_7 folded before Flop (didn't bet)
PokerStars Game #14519420999: Hold'em Limit ($0.02/$0.04) - 2008/01/13 - 00:23:43 (ET)
Table 'Merope' 10-max Seat #4 is the button
Seat 1: Player_1 ($0.65 in chips)
Seat 3: Player_2 ($0.49 in chips)
Seat 4: Player_3 ($1.79 in chips)
Seat 6: Player_4 ($2.05 in chips)
Seat 7: Player_5 ($1.18 in chips)
Seat 8: Player_6 ($0.34 in chips)
Seat 9: Player_7 ($1.35 in chips)
wakked13 will be allowed to play after the button
Player_4: posts small blind $0.01
Player_5: posts big blind $0.02
*** HOLE CARDS ***
Dealt to Player_7 [8d 5d]
Player_6 said, "vn"
Player_6: folds
Player_7: folds
Player_1: folds
Player_2: calls $0.02
Player_3: folds
Player_4: calls $0.01
Player_5: checks
*** FLOP *** [Th Jd 3c]
Player_3 said, "ty"
Player_4: checks
Player_5: bets $0.02
Player_2: calls $0.02
Player_4: calls $0.02
*** TURN *** [Th Jd 3c] [7c]
Player_4: checks
Player_5: bets $0.04
Player_2: raises $0.04 to $0.08
Player_4: folds
Player_5: calls $0.04
*** RIVER *** [Th Jd 3c 7c] [4s]
Player_5: checks
Player_2: bets $0.04
Player_5: calls $0.04
*** SHOW DOWN ***
Player_2: shows [8s 9s] (a straight, Seven to Jack)
Player_5: mucks hand
Player_2 collected $0.35 from pot
*** SUMMARY ***
Total pot $0.36 | Rake $0.01
Board [Th Jd 3c 7c 4s]
Seat 1: Player_1 folded before Flop (didn't bet)
Seat 3: Player_2 showed [8s 9s] and won ($0.35) with a straight, Seven to Jack
Seat 4: Player_3 (button) folded before Flop (didn't bet)
Seat 6: Player_4 (small blind) folded on the Turn
Seat 7: Player_5 (big blind) mucked [Qh Js]
Seat 8: Player_6 folded before Flop (didn't bet)
Seat 9: Player_7 folded before Flop (didn't bet)
PokerStars Game #14519433154: Hold'em Limit ($0.02/$0.04) - 2008/01/13 - 00:24:25 (ET)
Table 'Merope' 10-max Seat #6 is the button
Seat 1: Player_1 ($0.65 in chips)
Seat 3: Player_2 ($0.68 in chips)
Seat 4: Player_3 ($1.79 in chips)
Seat 6: Player_4 ($2.01 in chips)
Seat 7: Player_5 ($1.02 in chips)
Seat 8: Player_6 ($0.34 in chips)
Seat 9: Player_7 ($1.35 in chips)
Player_5: posts small blind $0.01
Player_6: posts big blind $0.02
wakked13: sits out
*** HOLE CARDS ***
Dealt to Player_7 [7c Jh]
Player_7: folds
Player_1: folds
Player_2: folds
Player_3: calls $0.02
Player_4: calls $0.02
Player_5: raises $0.02 to $0.04
Player_6: calls $0.02
Player_3: calls $0.02
Player_4: calls $0.02
*** FLOP *** [4h 9s Ad]
Player_5: checks
Player_6: checks
Player_3: bets $0.02
Player_4: raises $0.02 to $0.04
Player_5: folds
Player_6: folds
Player_3: raises $0.02 to $0.06
Player_4: raises $0.02 to $0.08
Betting is capped
Player_3: calls $0.02
*** TURN *** [4h 9s Ad] [Qc]
Player_3: bets $0.04
Player_4: raises $0.04 to $0.08
Player_3: raises $0.04 to $0.12
Player_4: raises $0.04 to $0.16
Betting is capped
Player_3: calls $0.04
*** RIVER *** [4h 9s Ad Qc] [Ks]
Player_3: bets $0.04
Player_4: raises $0.04 to $0.08
Player_3: raises $0.04 to $0.12
Player_4: raises $0.04 to $0.16
Betting is capped
Player_3: calls $0.04
*** SHOW DOWN ***
Player_4: shows [Ac Td] (a pair of Aces)
Player_3: shows [Ah 9d] (two pair, Aces and Nines)
Player_3 collected $0.92 from pot
*** SUMMARY ***
Total pot $0.96 | Rake $0.04
Board [4h 9s Ad Qc Ks]
Seat 1: Player_1 folded before Flop (didn't bet)
Seat 3: Player_2 folded before Flop (didn't bet)
Seat 4: Player_3 showed [Ah 9d] and won ($0.92) with two pair, Aces and Nines
Seat 6: Player_4 (button) showed [Ac Td] and lost with a pair of Aces
Seat 7: Player_5 (small blind) folded on the Flop
Seat 8: Player_6 (big blind) folded on the Flop
Seat 9: Player_7 folded before Flop (didn't bet)
@@ -0,0 +1,46 @@
Connected to MySQL on localhost. Print Hand Utility
options.site: PokerStars site_id: 2
From Table gametypes
====================
type: ring category: holdem limit_type: fl
sb: 1 bb: 2 sbet: 2 bbet: 4
From Table hands
================
site_hand_no: 14519394979 hand_start: 2008-01-13 05:22:15 seat_count: 7
Board cards: Qd Th Js 2s 7s
From Table hands_players
========================
player_name:Player_1 player_startcash:75 position:Btn cards:?? ?? winnings:0 rake:0
player_name:Player_2 player_startcash:59 position:SB cards:?? ?? winnings:0 rake:0
player_name:Player_3 player_startcash:147 position:BB cards:?? ?? winnings:0 rake:0
player_name:Player_4 player_startcash:198 position:4 off Btn cards:?? ?? winnings:31 rake:1
player_name:Player_5 player_startcash:122 position:3 off Btn cards:?? ?? winnings:0 rake:0
player_name:Player_6 player_startcash:48 position:2 off Btn cards:?? ?? winnings:0 rake:0
player_name:Player_7 player_startcash:139 position:1 off Btn cards:Ts Jh winnings:0 rake:0
From Table hands_actions
========================
player_name:Player_1 actionCount:0 street:Preflop streetActionNo:0 action:call amount:4
player_name:Player_1 actionCount:1 street:Flop streetActionNo:0 action:call amount:2
player_name:Player_1 actionCount:2 street:Turn streetActionNo:0 action:call amount:4
player_name:Player_1 actionCount:3 street:River streetActionNo:0 action:fold amount:0
player_name:Player_2 actionCount:0 street:Preflop streetActionNo:0 action:blind amount:1
player_name:Player_2 actionCount:1 street:Preflop streetActionNo:1 action:call amount:3
player_name:Player_2 actionCount:2 street:Flop streetActionNo:0 action:check amount:0
player_name:Player_2 actionCount:3 street:Flop streetActionNo:1 action:call amount:2
player_name:Player_2 actionCount:4 street:Turn streetActionNo:0 action:check amount:0
player_name:Player_2 actionCount:5 street:Turn streetActionNo:1 action:call amount:4
player_name:Player_2 actionCount:6 street:River streetActionNo:0 action:check amount:0
player_name:Player_2 actionCount:7 street:River streetActionNo:1 action:fold amount:0
player_name:Player_3 actionCount:0 street:Preflop streetActionNo:0 action:blind amount:2
player_name:Player_3 actionCount:1 street:Preflop streetActionNo:1 action:fold amount:0
player_name:Player_4 actionCount:0 street:Preflop streetActionNo:0 action:bet amount:4
player_name:Player_4 actionCount:1 street:Flop streetActionNo:0 action:bet amount:2
player_name:Player_4 actionCount:2 street:Turn streetActionNo:0 action:bet amount:4
player_name:Player_4 actionCount:3 street:River streetActionNo:0 action:bet amount:4
player_name:Player_5 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
player_name:Player_6 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
player_name:Player_7 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
@@ -0,0 +1,46 @@
Connected to MySQL on localhost. Print Hand Utility
options.site: PokerStars site_id: 2
From Table gametypes
====================
type: ring category: holdem limit_type: fl
sb: 1 bb: 2 sbet: 2 bbet: 4
From Table hands
================
site_hand_no: 14519420999 hand_start: 2008-01-13 05:23:43 seat_count: 7
Board cards: Th Jd 3c 7c 4s
From Table hands_players
========================
player_name:Player_1 player_startcash:65 position:2 off Btn cards:?? ?? winnings:0 rake:0
player_name:Player_2 player_startcash:49 position:1 off Btn cards:8s 9s winnings:35 rake:1
player_name:Player_3 player_startcash:179 position:Btn cards:?? ?? winnings:0 rake:0
player_name:Player_4 player_startcash:205 position:SB cards:?? ?? winnings:0 rake:0
player_name:Player_5 player_startcash:118 position:BB cards:Qh Js winnings:0 rake:0
player_name:Player_6 player_startcash:34 position:4 off Btn cards:?? ?? winnings:0 rake:0
player_name:Player_7 player_startcash:135 position:3 off Btn cards:8d 5d winnings:0 rake:0
From Table hands_actions
========================
player_name:Player_1 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
player_name:Player_2 actionCount:0 street:Preflop streetActionNo:0 action:call amount:2
player_name:Player_2 actionCount:1 street:Flop streetActionNo:0 action:call amount:2
player_name:Player_2 actionCount:2 street:Turn streetActionNo:0 action:bet amount:8
player_name:Player_2 actionCount:3 street:River streetActionNo:0 action:bet amount:4
player_name:Player_3 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
player_name:Player_4 actionCount:0 street:Preflop streetActionNo:0 action:blind amount:1
player_name:Player_4 actionCount:1 street:Preflop streetActionNo:1 action:call amount:1
player_name:Player_4 actionCount:2 street:Flop streetActionNo:0 action:check amount:0
player_name:Player_4 actionCount:3 street:Flop streetActionNo:1 action:call amount:2
player_name:Player_4 actionCount:4 street:Turn streetActionNo:0 action:check amount:0
player_name:Player_4 actionCount:5 street:Turn streetActionNo:1 action:fold amount:0
player_name:Player_5 actionCount:0 street:Preflop streetActionNo:0 action:blind amount:2
player_name:Player_5 actionCount:1 street:Preflop streetActionNo:1 action:check amount:0
player_name:Player_5 actionCount:2 street:Flop streetActionNo:0 action:bet amount:2
player_name:Player_5 actionCount:3 street:Turn streetActionNo:0 action:bet amount:4
player_name:Player_5 actionCount:4 street:Turn streetActionNo:1 action:call amount:4
player_name:Player_5 actionCount:5 street:River streetActionNo:0 action:check amount:0
player_name:Player_5 actionCount:6 street:River streetActionNo:1 action:call amount:4
player_name:Player_6 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
player_name:Player_7 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
@@ -0,0 +1,55 @@
Connected to MySQL on localhost. Print Hand Utility
options.site: PokerStars site_id: 2
From Table gametypes
====================
type: ring category: holdem limit_type: fl
sb: 1 bb: 2 sbet: 2 bbet: 4
From Table hands
================
site_hand_no: 14519433154 hand_start: 2008-01-13 05:24:25 seat_count: 7
Board cards: 4h 9s Ad Qc Ks
From Table hands_players
========================
player_name:Player_1 player_startcash:65 position:3 off Btn cards:?? ?? winnings:0 rake:0
player_name:Player_2 player_startcash:68 position:2 off Btn cards:?? ?? winnings:0 rake:0
player_name:Player_3 player_startcash:179 position:1 off Btn cards:Ah 9d winnings:92 rake:4
player_name:Player_4 player_startcash:201 position:Btn cards:Ac Td winnings:0 rake:0
player_name:Player_5 player_startcash:102 position:SB cards:?? ?? winnings:0 rake:0
player_name:Player_6 player_startcash:34 position:BB cards:?? ?? winnings:0 rake:0
player_name:Player_7 player_startcash:135 position:4 off Btn cards:7c Jh winnings:0 rake:0
From Table hands_actions
========================
player_name:Player_1 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
player_name:Player_2 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
player_name:Player_3 actionCount:0 street:Preflop streetActionNo:0 action:call amount:2
player_name:Player_3 actionCount:1 street:Preflop streetActionNo:1 action:call amount:2
player_name:Player_3 actionCount:2 street:Flop streetActionNo:0 action:bet amount:2
player_name:Player_3 actionCount:3 street:Flop streetActionNo:1 action:bet amount:4
player_name:Player_3 actionCount:4 street:Flop streetActionNo:2 action:call amount:2
player_name:Player_3 actionCount:5 street:Turn streetActionNo:0 action:bet amount:4
player_name:Player_3 actionCount:6 street:Turn streetActionNo:1 action:bet amount:8
player_name:Player_3 actionCount:7 street:Turn streetActionNo:2 action:call amount:4
player_name:Player_3 actionCount:8 street:River streetActionNo:0 action:bet amount:4
player_name:Player_3 actionCount:9 street:River streetActionNo:1 action:bet amount:8
player_name:Player_3 actionCount:10 street:River streetActionNo:2 action:call amount:4
player_name:Player_4 actionCount:0 street:Preflop streetActionNo:0 action:call amount:2
player_name:Player_4 actionCount:1 street:Preflop streetActionNo:1 action:call amount:2
player_name:Player_4 actionCount:2 street:Flop streetActionNo:0 action:bet amount:4
player_name:Player_4 actionCount:3 street:Flop streetActionNo:1 action:bet amount:4
player_name:Player_4 actionCount:4 street:Turn streetActionNo:0 action:bet amount:8
player_name:Player_4 actionCount:5 street:Turn streetActionNo:1 action:bet amount:8
player_name:Player_4 actionCount:6 street:River streetActionNo:0 action:bet amount:8
player_name:Player_4 actionCount:7 street:River streetActionNo:1 action:bet amount:8
player_name:Player_5 actionCount:0 street:Preflop streetActionNo:0 action:blind amount:1
player_name:Player_5 actionCount:1 street:Preflop streetActionNo:1 action:bet amount:3
player_name:Player_5 actionCount:2 street:Flop streetActionNo:0 action:check amount:0
player_name:Player_5 actionCount:3 street:Flop streetActionNo:1 action:fold amount:0
player_name:Player_6 actionCount:0 street:Preflop streetActionNo:0 action:blind amount:2
player_name:Player_6 actionCount:1 street:Preflop streetActionNo:1 action:call amount:2
player_name:Player_6 actionCount:2 street:Flop streetActionNo:0 action:check amount:0
player_name:Player_6 actionCount:3 street:Flop streetActionNo:1 action:fold amount:0
player_name:Player_7 actionCount:0 street:Preflop streetActionNo:0 action:fold amount:0
+43
View File
@@ -0,0 +1,43 @@
#!/bin/sh
#Copyright 2008 Steffen Jobbagy-Felso
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU Affero General Public License as published by
#the Free Software Foundation, version 3 of the License.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU Affero General Public License
#along with this program. If not, see <http://www.gnu.org/licenses/>.
#In the "official" distribution you can find the license in
#agpl-3.0.txt in the docs folder of the package.
echo "Please note for this to really work you need to work on an empty database"
rm *.found.txt
../pyfpdb/fpdb_import.py -p$1 --file=ps-holdem-ring-001to003.txt -x
../pyfpdb/fpdb_import.py -p$1 --file=ps-holdem-ring-001to003.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"
./print_hand.py -p$1 --hand=14519394979 > ps.14519394979.found.txt && colordiff ps.14519394979.found.txt ps.14519394979.expected.txt
./print_hand.py -p$1 --hand=14519420999 > ps.14519420999.found.txt && colordiff ps.14519420999.found.txt ps.14519420999.expected.txt
./print_hand.py -p$1 --hand=14519433154 > ps.14519433154.found.txt && colordiff ps.14519433154.found.txt ps.14519433154.expected.txt
./PrintPlayerFlags.py -p$1 > ps-flags-3hands.found.txt && colordiff ps-flags-3hands.found.txt ps-flags-3hands.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
echo "if everything was printed as expected this worked"