git36 - implement tv-combinedStealFold and tv-combined2B3B

This commit is contained in:
steffen123 2008-08-15 02:45:19 +01:00
parent 341b24a2e0
commit ff2e75cb6b
5 changed files with 61 additions and 19 deletions

View File

@ -3,6 +3,8 @@ db-host=localhost
db-databaseName=fpdb db-databaseName=fpdb
db-user=fpdb db-user=fpdb
db-password=enterYourPwHere db-password=enterYourPwHere
tv-combinedStealFold=True
tv-combined2B3B=True
tv-combinedPostflop=True tv-combinedPostflop=True
bulkImport-defaultPath=default bulkImport-defaultPath=default
tv-defaultPath=default tv-defaultPath=default

View File

@ -3,6 +3,7 @@ Everything is subject to change and especially the order will often change. Patc
alpha2 (release by 17Aug) alpha2 (release by 17Aug)
====== ======
make table drops depending on previous db version
move version into seperate file for fpdb gui and db move version into seperate file for fpdb gui and db
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 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
auto-import auto-import
@ -30,6 +31,7 @@ fix bug that sawFlop/Turn/River gets miscalculated if someone is allin - might a
before beta before beta
=========== ===========
gentoo ebuild: USE postgresql gentoo ebuild: USE postgresql
skins
optionally combine FB/FS and CB/2B/3B optionally combine FB/FS and CB/2B/3B
separate all gui and all processing into files that are named accordingly separate all gui and all processing into files that are named accordingly
ensure that there is only one db handle flying around and that its state is handled properly, ie. by the GUI. i think that might be why we have to reconnect the DB in tableviewer. ensure that there is only one db handle flying around and that its state is handled properly, ie. by the GUI. i think that might be why we have to reconnect the DB in tableviewer.

View File

@ -245,6 +245,8 @@ class fpdb:
self.settings['os']="linuxmac" self.settings['os']="linuxmac"
else: else:
self.settings['os']="windows" self.settings['os']="windows"
self.settings['tv-combinedStealFold']=True
self.settings['tv-combined2B3B']=True
if self.settings['os']=="windows": if self.settings['os']=="windows":
self.settings['bulkImport-defaultPath']="C:\\Program Files\\PokerStars\\HandHistory\\filename.txt" self.settings['bulkImport-defaultPath']="C:\\Program Files\\PokerStars\\HandHistory\\filename.txt"
@ -269,12 +271,26 @@ class fpdb:
self.settings['tv-combinedPostflop']=True self.settings['tv-combinedPostflop']=True
else: else:
self.settings['tv-combinedPostflop']=False self.settings['tv-combinedPostflop']=False
elif lines[i].startswith("tv-combinedStealFold="):
if lines[i].find("True")!=-1:
self.settings['tv-combinedStealFold']=True
else:
self.settings['tv-combinedStealFold']=False
elif lines[i].startswith("tv-combined2B3B="):
if lines[i].find("True")!=-1:
self.settings['tv-combined2B3B']=True
else:
self.settings['tv-combined2B3B']=False
elif lines[i].startswith("bulkImport-defaultPath="): elif lines[i].startswith("bulkImport-defaultPath="):
if lines[i][23:-1]!="default": if lines[i][23:-1]!="default":
self.settings['bulkImport-defaultPath']=lines[i][23:-1] self.settings['bulkImport-defaultPath']=lines[i][23:-1]
elif lines[i].startswith("tv-defaultPath="): elif lines[i].startswith("tv-defaultPath="):
if lines[i][15:-1]!="default": if lines[i][15:-1]!="default":
self.settings['tv-defaultPath']=lines[i][15:-1] self.settings['tv-defaultPath']=lines[i][15:-1]
elif lines[i].startswith("#"):
pass #comment - dont parse
else:
raise fpdb_simple.FpdbError("invalid line in profile file: "+lines[i])
if self.db!=None: if self.db!=None:
self.db.disconnect() self.db.disconnect()
@ -347,9 +363,9 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt")
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.connect("delete_event", self.delete_event) self.window.connect("delete_event", self.delete_event)
self.window.connect("destroy", self.destroy) self.window.connect("destroy", self.destroy)
self.window.set_title("Free Poker DB - version: alpha1+, git35") self.window.set_title("Free Poker DB - version: alpha1+, git36")
self.window.set_border_width(1) self.window.set_border_width(1)
self.window.set_size_request(950,400) self.window.set_size_request(1020,400)
self.window.set_resizable(True) self.window.set_resizable(True)
self.menu_items = ( self.menu_items = (

View File

@ -87,18 +87,18 @@ class fpdb_db:
def drop_tables(self): def drop_tables(self):
"""Drops the fpdb tables from the current db""" """Drops the fpdb tables from the current db"""
#todo: run the below if current db is git34 or lower #todo: run the below if current db is git34 or lower
#self.cursor.execute("DROP TABLE IF EXISTS settings;") self.cursor.execute("DROP TABLE IF EXISTS settings;")
#self.cursor.execute("DROP TABLE IF EXISTS HudDataHoldemOmaha;") self.cursor.execute("DROP TABLE IF EXISTS HudDataHoldemOmaha;")
#self.cursor.execute("DROP TABLE IF EXISTS autorates;") self.cursor.execute("DROP TABLE IF EXISTS autorates;")
#self.cursor.execute("DROP TABLE IF EXISTS board_cards;") self.cursor.execute("DROP TABLE IF EXISTS board_cards;")
#self.cursor.execute("DROP TABLE IF EXISTS hands_actions;") self.cursor.execute("DROP TABLE IF EXISTS hands_actions;")
#self.cursor.execute("DROP TABLE IF EXISTS hands_players;") self.cursor.execute("DROP TABLE IF EXISTS hands_players;")
#self.cursor.execute("DROP TABLE IF EXISTS hands;") self.cursor.execute("DROP TABLE IF EXISTS hands;")
#self.cursor.execute("DROP TABLE IF EXISTS tourneys_players;") self.cursor.execute("DROP TABLE IF EXISTS tourneys_players;")
#self.cursor.execute("DROP TABLE IF EXISTS tourneys;") self.cursor.execute("DROP TABLE IF EXISTS tourneys;")
#self.cursor.execute("DROP TABLE IF EXISTS players;") self.cursor.execute("DROP TABLE IF EXISTS players;")
#self.cursor.execute("DROP TABLE IF EXISTS gametypes;") self.cursor.execute("DROP TABLE IF EXISTS gametypes;")
#self.cursor.execute("DROP TABLE IF EXISTS sites;") self.cursor.execute("DROP TABLE IF EXISTS sites;")
self.cursor.execute("DROP TABLE IF EXISTS Settings;") self.cursor.execute("DROP TABLE IF EXISTS Settings;")
self.cursor.execute("DROP TABLE IF EXISTS HudDataHoldemOmaha;") self.cursor.execute("DROP TABLE IF EXISTS HudDataHoldemOmaha;")

View File

@ -59,11 +59,25 @@ class table_viewer (threading.Thread):
arr=[] arr=[]
#first prepare the header row #first prepare the header row
if (self.category=="holdem" or self.category=="omahahi" or self.category=="omahahilo"): if (self.category=="holdem" or self.category=="omahahi" or self.category=="omahahilo"):
tmp=("Name", "Hands", "VPIP", "PFR", "PF3B4B", "ST", "FS", "FB", "CB", "2B", "3B") tmp=("Name", "Hands", "VPIP", "PFR", "PF3B4B", "ST")
if self.settings['tv-combinedStealFold']:
tmp+=("FSB", )
else:
tmp+=("FS", "FB")
tmp+=("CB", )
if self.settings['tv-combined2B3B']:
tmp+=("23B", )
else:
tmp+=("2B", "3B")
if self.settings['tv-combinedPostflop']: if self.settings['tv-combinedPostflop']:
tmp+=("Postf A", "Postf F") tmp+=("Postf A", "Postf F")
else: else:
tmp+=("AF", "FF", "AT", "FT", "AR", "FR") tmp+=("AF", "FF", "AT", "FT", "AR", "FR")
tmp+=("WtSD", "W$wsF", "W$SD") tmp+=("WtSD", "W$wsF", "W$SD")
else: else:
raise fpdb_simple.FpdbError("reimplement stud") raise fpdb_simple.FpdbError("reimplement stud")
@ -111,10 +125,18 @@ class table_viewer (threading.Thread):
tmp.append(self.hudDivide(row[8],row[7])+" ("+str(row[7])+")") #PF3B4B tmp.append(self.hudDivide(row[8],row[7])+" ("+str(row[7])+")") #PF3B4B
tmp.append(self.hudDivide(row[25],row[24])+" ("+str(row[24])+")") #ST tmp.append(self.hudDivide(row[25],row[24])+" ("+str(row[24])+")") #ST
if self.settings['tv-combinedStealFold']:
tmp.append(self.hudDivide(row[29]+row[27],row[28]+row[26])+" ("+str(row[28]+row[26])+")") #FSB
else:
tmp.append(self.hudDivide(row[29],row[28])+" ("+str(row[28])+")") #FS tmp.append(self.hudDivide(row[29],row[28])+" ("+str(row[28])+")") #FS
tmp.append(self.hudDivide(row[27],row[26])+" ("+str(row[26])+")") #FB tmp.append(self.hudDivide(row[27],row[26])+" ("+str(row[26])+")") #FB
tmp.append(self.hudDivide(row[31],row[30])+" ("+str(row[30])+")") #CB tmp.append(self.hudDivide(row[31],row[30])+" ("+str(row[30])+")") #CB
if self.settings['tv-combined2B3B']:
tmp.append(self.hudDivide(row[33]+row[35],row[32]+row[34])+" ("+str(row[32]+row[34])+")") #23B
else:
tmp.append(self.hudDivide(row[33],row[32])+" ("+str(row[32])+")") #2B tmp.append(self.hudDivide(row[33],row[32])+" ("+str(row[32])+")") #2B
tmp.append(self.hudDivide(row[35],row[34])+" ("+str(row[34])+")") #3B tmp.append(self.hudDivide(row[35],row[34])+" ("+str(row[34])+")") #3B