p71 - fixed guibulkimport. thought I'd already done that, but there you go..

added 4B detection to HudCache filling
added primitive filling code for foldToStreetXCB, this'll not be correct for all cases yet
This commit is contained in:
steffen123 2008-08-31 21:22:36 +01:00
parent 0b96d49b23
commit a289f7b151
4 changed files with 89 additions and 37 deletions

View File

@ -2,17 +2,14 @@ todolist (db=database, imp=importer, tv=tableviewer)
Everything is subject to change and the order does not indicate priority. Patches for any of these or other features are very welcome, see readme-overview.txt for contacts.
Please also see db-todo.txt
alpha3 (release by 31Aug)
alpha3 (release 1Sep?)
======
add dedicated update page
update status or make a support matrix table for website
add instructions for mailing list to contacts
(fixed by ray) auto import only runs on one file per start
find correct sf logo link
hud displayed 0/3 but a 2 digit percentage for W$SD?
show database version error in GUI and use fpdb_db class const for it, add it to title
hud displayed 0/3 but a 2 digit percentage for W$SD?
anonymiser script to generate testdata without making a dozen find&replace all... remember to replace hand no with running no
specify NOT NULL on almost all table columns
store raw hand in db and write reimport function using the raw hand field
@ -24,13 +21,16 @@ make sure totalProfit shows actual profit rather than winnings.
update abbreviations.txt
(steffen) finish bringing back tourney
export settings[hud-defaultInterval] to conf
fill the fold to CB/2B/3B, check-/call-raise cache fields
fill check-/call-raise cache fields
fix foldToCB cache fields to catch everything properly
table with data for graphs for SD/F, W$wSF, W$@SD
printhand each and the 2/3 relevant printplayerflags respectively on ps-lhe-ring-successful-steal-by-cutoff.txt and ps-lhe-ring-call-3B-preflop-cb-no2b.txt
before beta
===========
add dedicated update page
update status or make a support matrix table for website
separate db table design version and last bugfix in importer
change tabledesign VALIGN
finish updating filelist

View File

@ -32,7 +32,7 @@ class GuiBulkImport (threading.Thread):
print "BulkImport is not recursive - please select the final directory in which the history files are"
else:
self.inputFile=self.path+os.sep+file
fpdb_import.import_file_dict(self, self.settings)
fpdb_import.import_file_dict(self, self.settings, False)
print "GuiBulkImport.import_dir done"
def load_clicked(self, widget, data=None):
@ -69,7 +69,7 @@ class GuiBulkImport (threading.Thread):
if os.path.isdir(self.inputFile):
self.import_dir()
else:
fpdb_import.import_file_dict(self, self.settings)
fpdb_import.import_file_dict(self, self.settings, False)
def get_vbox(self):
"""returns the vbox of this thread"""

View File

@ -391,7 +391,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: alpha2, p68")
self.window.set_title("Free Poker DB - version: alpha2+, p71")
self.window.set_border_width(1)
self.window.set_size_request(1020,400)
self.window.set_resizable(True)

View File

@ -1608,6 +1608,7 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
#now CB
street1CBChance=[]
street1CBDone=[]
someoneDidStreet1CB=False
for player in range (len(player_ids)):
myStreet1CBChance=False
myStreet1CBDone=False
@ -1616,6 +1617,7 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
myStreet1CBChance=True
if street1Aggr[player]:
myStreet1CBDone=True
someoneDidStreet1CB=True
street1CBChance.append(myStreet1CBChance)
street1CBDone.append(myStreet1CBDone)
@ -1625,6 +1627,7 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
#now 2B
street2CBChance=[]
street2CBDone=[]
someoneDidStreet2CB=False
for player in range (len(player_ids)):
myStreet2CBChance=False
myStreet2CBDone=False
@ -1633,6 +1636,7 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
myStreet2CBChance=True
if street2Aggr[player]:
myStreet2CBDone=True
someoneDidStreet2CB=True
street2CBChance.append(myStreet2CBChance)
street2CBDone.append(myStreet2CBDone)
@ -1642,6 +1646,7 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
#now 3B
street3CBChance=[]
street3CBDone=[]
someoneDidStreet3CB=False
for player in range (len(player_ids)):
myStreet3CBChance=False
myStreet3CBDone=False
@ -1650,19 +1655,27 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
myStreet3CBChance=True
if street3Aggr[player]:
myStreet3CBDone=True
someoneDidStreet3CB=True
street3CBChance.append(myStreet3CBChance)
street3CBDone.append(myStreet3CBDone)
result['street3CBChance']=street3CBChance
result['street3CBDone']=street3CBDone
#4B - todo, implement for stud/razz
#and 4B
street4CBChance=[]
street4CBDone=[]
someoneDidStreet4CB=False
for player in range (len(player_ids)):
myStreet4CBChance=False
myStreet4CBDone=False
if street3CBDone[player]:
myStreet4CBChance=True
if street4Aggr[player]:
myStreet4CBDone=True
someoneDidStreet4CB=True
street4CBChance.append(myStreet4CBChance)
street4CBDone.append(myStreet4CBDone)
result['street4CBChance']=street4CBChance
@ -1680,6 +1693,72 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
foldToStreet4CBChance=[]
foldToStreet4CBDone=[]
for player in range (len(player_ids)):
myFoldToStreet1CBChance=False
myFoldToStreet1CBDone=False
if someoneDidStreet1CB:
if street1CBDone[player]:
pass
elif street1Seen[player]:
myFoldToStreet1CBChance=True
if foldToOtherRaisedStreet1[player]:
myFoldToStreet1CBDone=True
foldToStreet1CBChance.append(myFoldToStreet1CBChance)
foldToStreet1CBDone.append(myFoldToStreet1CBDone)
for player in range (len(player_ids)):
myFoldToStreet2CBChance=False
myFoldToStreet2CBDone=False
if someoneDidStreet2CB:
if street2CBDone[player]:
pass
elif street2Seen[player]:
myFoldToStreet2CBChance=True
if foldToOtherRaisedStreet2[player]:
myFoldToStreet2CBDone=True
foldToStreet2CBChance.append(myFoldToStreet2CBChance)
foldToStreet2CBDone.append(myFoldToStreet2CBDone)
for player in range (len(player_ids)):
myFoldToStreet3CBChance=False
myFoldToStreet3CBDone=False
if someoneDidStreet3CB:
if street3CBDone[player]:
pass
elif street3Seen[player]:
myFoldToStreet3CBChance=True
if foldToOtherRaisedStreet3[player]:
myFoldToStreet3CBDone=True
foldToStreet3CBChance.append(myFoldToStreet3CBChance)
foldToStreet3CBDone.append(myFoldToStreet3CBDone)
for player in range (len(player_ids)):
myFoldToStreet4CBChance=False
myFoldToStreet4CBDone=False
if someoneDidStreet4CB:
if street4CBDone[player]:
pass
elif street4Seen[player]:
myFoldToStreet4CBChance=True
if foldToOtherRaisedStreet4[player]:
myFoldToStreet4CBDone=True
foldToStreet4CBChance.append(myFoldToStreet4CBChance)
foldToStreet4CBDone.append(myFoldToStreet4CBDone)
result['foldToStreet1CBChance']=foldToStreet1CBChance
result['foldToStreet1CBDone']=foldToStreet1CBDone
result['foldToStreet2CBChance']=foldToStreet2CBChance
result['foldToStreet2CBDone']=foldToStreet2CBDone
result['foldToStreet3CBChance']=foldToStreet3CBChance
result['foldToStreet3CBDone']=foldToStreet3CBDone
result['foldToStreet4CBChance']=foldToStreet4CBChance
result['foldToStreet4CBDone']=foldToStreet4CBDone
totalProfit=[]
street1CheckCallRaiseChance=[]
@ -1691,15 +1770,6 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
street4CheckCallRaiseChance=[]
street4CheckCallRaiseDone=[]
for player in range (len(player_ids)):
myFoldToStreet1CBChance=False
myFoldToStreet1CBDone=False
myFoldToStreet2CBChance=False
myFoldToStreet2CBDone=False
myFoldToStreet3CBChance=False
myFoldToStreet3CBDone=False
myFoldToStreet4CBChance=False
myFoldToStreet4CBDone=False
myTotalProfit=0
myStreet1CheckCallRaiseChance=False
@ -1711,15 +1781,6 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
myStreet4CheckCallRaiseChance=False
myStreet4CheckCallRaiseDone=False
foldToStreet1CBChance.append(myFoldToStreet1CBChance)
foldToStreet1CBDone.append(myFoldToStreet1CBDone)
foldToStreet2CBChance.append(myFoldToStreet2CBChance)
foldToStreet2CBDone.append(myFoldToStreet2CBDone)
foldToStreet3CBChance.append(myFoldToStreet3CBChance)
foldToStreet3CBDone.append(myFoldToStreet3CBDone)
foldToStreet4CBChance.append(myFoldToStreet4CBChance)
foldToStreet4CBDone.append(myFoldToStreet4CBDone)
totalProfit.append(myTotalProfit)
street1CheckCallRaiseChance.append(myStreet1CheckCallRaiseChance)
@ -1731,15 +1792,6 @@ def generateHudData(player_ids, category, action_types, actionTypeByNo, winnings
street4CheckCallRaiseChance.append(myStreet4CheckCallRaiseChance)
street4CheckCallRaiseDone.append(myStreet4CheckCallRaiseDone)
result['foldToStreet1CBChance']=foldToStreet1CBChance
result['foldToStreet1CBDone']=foldToStreet1CBDone
result['foldToStreet2CBChance']=foldToStreet2CBChance
result['foldToStreet2CBDone']=foldToStreet2CBDone
result['foldToStreet3CBChance']=foldToStreet3CBChance
result['foldToStreet3CBDone']=foldToStreet3CBDone
result['foldToStreet4CBChance']=foldToStreet4CBChance
result['foldToStreet4CBDone']=foldToStreet4CBDone
result['totalProfit']=totalProfit
result['street1CheckCallRaiseChance']=street1CheckCallRaiseChance