p43 - implemented gametypes.base/.hiLo and more updates to table design
This commit is contained in:
parent
e9d8b685ec
commit
9531c8d85b
|
@ -3,8 +3,9 @@ Everything is subject to change and especially the order will often change. Patc
|
||||||
|
|
||||||
alpha2 (release by 17Aug)
|
alpha2 (release by 17Aug)
|
||||||
======
|
======
|
||||||
implement gametypes.base/hiLo
|
implement hands.tableName/importTime HandsPlayers.seatNo
|
||||||
|
|
||||||
|
change tabledesign VALIGN
|
||||||
seperate and improve instructions for update
|
seperate and improve instructions for update
|
||||||
verify link in release notes
|
verify link in release notes
|
||||||
split install instructions into OS-specific and OS-independent section. expand release creator to concatenate.
|
split install instructions into OS-specific and OS-independent section. expand release creator to concatenate.
|
||||||
|
@ -17,6 +18,7 @@ ebuild: symlink doesnt work, USE gtk, more automation, update install-in-gentoo.
|
||||||
|
|
||||||
alpha3
|
alpha3
|
||||||
======
|
======
|
||||||
|
store raw hand in db
|
||||||
export settings[hud-defaultInterval] to conf
|
export settings[hud-defaultInterval] to conf
|
||||||
fix up bg colours in tv
|
fix up bg colours in tv
|
||||||
fill the fold to CB/2B/3B cache fields
|
fill the fold to CB/2B/3B cache fields
|
||||||
|
@ -35,8 +37,9 @@ printhand each and the 2/3 relevant printplayerflags respectively on ps-lhe-ring
|
||||||
|
|
||||||
before beta
|
before beta
|
||||||
===========
|
===========
|
||||||
|
maybe remove siteId from gametypes
|
||||||
?change most cache fields to bigint to allow extremely big databases in excess of 2 or 4 million hands per stake and position?
|
?change most cache fields to bigint to allow extremely big databases in excess of 2 or 4 million hands per stake and position?
|
||||||
optionally make tv positional
|
rakeback/frequent player points
|
||||||
gentoo ebuild: USE postgresql
|
gentoo ebuild: USE postgresql
|
||||||
skins
|
skins
|
||||||
optionally combine FB/FS and CB/2B/3B
|
optionally combine FB/FS and CB/2B/3B
|
||||||
|
|
|
@ -229,6 +229,11 @@ The program itself is licensed under AGPLv3, see agpl-3.0.txt</p>
|
||||||
<TD><P>bigint</P></TD>
|
<TD><P>bigint</P></TD>
|
||||||
<TD><P><BR></P></TD>
|
<TD><P><BR></P></TD>
|
||||||
</TR>
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD><P>tableName</P></TD>
|
||||||
|
<TD><P>varchar(20)</P></TD>
|
||||||
|
<TD><P>The site's name for the current table</P></TD>
|
||||||
|
</TR>
|
||||||
<TR VALIGN=TOP>
|
<TR VALIGN=TOP>
|
||||||
<TD><P>siteHandNo</P></TD>
|
<TD><P>siteHandNo</P></TD>
|
||||||
<TD><P>bigint</P></TD>
|
<TD><P>bigint</P></TD>
|
||||||
|
@ -244,6 +249,11 @@ The program itself is licensed under AGPLv3, see agpl-3.0.txt</p>
|
||||||
<TD><P>datetime (in UTC)</P></TD>
|
<TD><P>datetime (in UTC)</P></TD>
|
||||||
<TD><P>start date&time of the hand</P></TD>
|
<TD><P>start date&time of the hand</P></TD>
|
||||||
</TR>
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD><P>importTime</P></TD>
|
||||||
|
<TD><P>datetime (in UTC)</P></TD>
|
||||||
|
<TD><P>date&time of import of this hand</P></TD>
|
||||||
|
</TR>
|
||||||
<TR VALIGN=TOP>
|
<TR VALIGN=TOP>
|
||||||
<TD><P>seats</P></TD>
|
<TD><P>seats</P></TD>
|
||||||
<TD><P>smallint</P></TD>
|
<TD><P>smallint</P></TD>
|
||||||
|
@ -322,8 +332,13 @@ The program itself is licensed under AGPLv3, see agpl-3.0.txt</p>
|
||||||
<TR VALIGN=TOP>
|
<TR VALIGN=TOP>
|
||||||
<TD><P>position</P></TD>
|
<TD><P>position</P></TD>
|
||||||
<TD><P>char(1)</P></TD>
|
<TD><P>char(1)</P></TD>
|
||||||
<TD><p>BB=B, SB=S, Button=0, Cutoff=1, etc.</P>
|
<TD><p>BB=B, SB=S, Button=0, Cutoff=1, etc.<br>
|
||||||
<P>This is used in holdem/omaha only.</P></TD>
|
This is used in holdem/omaha only.</P></TD>
|
||||||
|
</TR>
|
||||||
|
<TR VALIGN=TOP>
|
||||||
|
<TD><P>seatNo</P></TD>
|
||||||
|
<TD><P>smallint</P></TD>
|
||||||
|
<TD><p>The seat in which the person was sitting - necessary for HUD</P></TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR VALIGN=TOP>
|
<TR VALIGN=TOP>
|
||||||
<TD><P>ante</P></TD>
|
<TD><P>ante</P></TD>
|
||||||
|
@ -333,8 +348,8 @@ The program itself is licensed under AGPLv3, see agpl-3.0.txt</p>
|
||||||
<TR VALIGN=TOP>
|
<TR VALIGN=TOP>
|
||||||
<TD><P>cardXValue</P></TD>
|
<TD><P>cardXValue</P></TD>
|
||||||
<TD><P>smallint</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><p>2-10=2-10, J=11, Q=12, K=13, A=14 (even in razz), unknown/no card=x<br>
|
||||||
<P>see note above table</P></TD>
|
see note above table</P></TD>
|
||||||
</TR>
|
</TR>
|
||||||
<TR VALIGN=TOP>
|
<TR VALIGN=TOP>
|
||||||
<TD><P>cardXSuit</P></TD>
|
<TD><P>cardXSuit</P></TD>
|
||||||
|
|
|
@ -370,7 +370,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 = 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+, p42")
|
self.window.set_title("Free Poker DB - version: alpha1+, p43")
|
||||||
self.window.set_border_width(1)
|
self.window.set_border_width(1)
|
||||||
self.window.set_size_request(1020,400)
|
self.window.set_size_request(1020,400)
|
||||||
self.window.set_resizable(True)
|
self.window.set_resizable(True)
|
||||||
|
|
|
@ -47,7 +47,7 @@ class fpdb_db:
|
||||||
try:
|
try:
|
||||||
self.cursor.execute("SELECT * FROM Settings")
|
self.cursor.execute("SELECT * FROM Settings")
|
||||||
settings=self.cursor.fetchone()
|
settings=self.cursor.fetchone()
|
||||||
if settings[0]!=41:
|
if settings[0]!=43:
|
||||||
print "outdated or too new database version - please recreate tables"
|
print "outdated or too new database version - please recreate tables"
|
||||||
except:# _mysql_exceptions.ProgrammingError:
|
except:# _mysql_exceptions.ProgrammingError:
|
||||||
print "failed to read settings table - please recreate tables"
|
print "failed to read settings table - please recreate tables"
|
||||||
|
@ -159,8 +159,10 @@ class fpdb_db:
|
||||||
id SMALLINT UNSIGNED UNIQUE AUTO_INCREMENT, PRIMARY KEY (id),
|
id SMALLINT UNSIGNED UNIQUE AUTO_INCREMENT, PRIMARY KEY (id),
|
||||||
siteId SMALLINT UNSIGNED, FOREIGN KEY (siteId) REFERENCES Sites(id),
|
siteId SMALLINT UNSIGNED, FOREIGN KEY (siteId) REFERENCES Sites(id),
|
||||||
type char(4),
|
type char(4),
|
||||||
|
base char(4),
|
||||||
category varchar(9),
|
category varchar(9),
|
||||||
limitType char(2),
|
limitType char(2),
|
||||||
|
hiLo char(1),
|
||||||
smallBlind int,
|
smallBlind int,
|
||||||
bigBlind int,
|
bigBlind int,
|
||||||
smallBet int,
|
smallBet int,
|
||||||
|
@ -184,11 +186,13 @@ class fpdb_db:
|
||||||
|
|
||||||
self.create_table("""Hands (
|
self.create_table("""Hands (
|
||||||
id BIGINT UNSIGNED UNIQUE AUTO_INCREMENT, PRIMARY KEY (id),
|
id BIGINT UNSIGNED UNIQUE AUTO_INCREMENT, PRIMARY KEY (id),
|
||||||
siteHandNo bigint,
|
tableName VARCHAR(20),
|
||||||
|
siteHandNo BIGINT,
|
||||||
gametypeId SMALLINT UNSIGNED, FOREIGN KEY (gametypeId) REFERENCES Gametypes(id),
|
gametypeId SMALLINT UNSIGNED, FOREIGN KEY (gametypeId) REFERENCES Gametypes(id),
|
||||||
handStart DATETIME,
|
handStart DATETIME,
|
||||||
seats smallint,
|
importTime DATETIME,
|
||||||
comment text,
|
seats SMALLINT,
|
||||||
|
comment TEXT,
|
||||||
commentTs DATETIME)""")
|
commentTs DATETIME)""")
|
||||||
|
|
||||||
self.create_table("""BoardCards (
|
self.create_table("""BoardCards (
|
||||||
|
@ -237,9 +241,10 @@ class fpdb_db:
|
||||||
id BIGINT UNSIGNED UNIQUE AUTO_INCREMENT, PRIMARY KEY (id),
|
id BIGINT UNSIGNED UNIQUE AUTO_INCREMENT, PRIMARY KEY (id),
|
||||||
handId BIGINT UNSIGNED, FOREIGN KEY (handId) REFERENCES Hands(id),
|
handId BIGINT UNSIGNED, FOREIGN KEY (handId) REFERENCES Hands(id),
|
||||||
playerId INT UNSIGNED, FOREIGN KEY (playerId) REFERENCES Players(id),
|
playerId INT UNSIGNED, FOREIGN KEY (playerId) REFERENCES Players(id),
|
||||||
startCash int,
|
startCash INT,
|
||||||
position char(1),
|
position CHAR(1),
|
||||||
ante int,
|
seatNo SMALLINT,
|
||||||
|
ante INT,
|
||||||
|
|
||||||
card1Value smallint,
|
card1Value smallint,
|
||||||
card1Suit char(1),
|
card1Suit char(1),
|
||||||
|
@ -332,7 +337,7 @@ class fpdb_db:
|
||||||
riverCheckCallRaiseChance INT,
|
riverCheckCallRaiseChance INT,
|
||||||
riverCheckCallRaiseDone INT)""")
|
riverCheckCallRaiseDone INT)""")
|
||||||
|
|
||||||
self.cursor.execute("INSERT INTO Settings VALUES (41);")
|
self.cursor.execute("INSERT INTO Settings VALUES (43);")
|
||||||
self.cursor.execute("INSERT INTO Sites VALUES (DEFAULT, \"Full Tilt Poker\", 'USD');")
|
self.cursor.execute("INSERT INTO Sites VALUES (DEFAULT, \"Full Tilt Poker\", 'USD');")
|
||||||
self.cursor.execute("INSERT INTO Sites VALUES (DEFAULT, \"PokerStars\", 'USD');")
|
self.cursor.execute("INSERT INTO Sites VALUES (DEFAULT, \"PokerStars\", 'USD');")
|
||||||
self.cursor.execute("INSERT INTO TourneysGametypes (id) VALUES (DEFAULT);")
|
self.cursor.execute("INSERT INTO TourneysGametypes (id) VALUES (DEFAULT);")
|
||||||
|
|
|
@ -967,22 +967,31 @@ def recogniseGametypeID(cursor, topline, site_id, category, isTourney):#todo: th
|
||||||
try:
|
try:
|
||||||
len(result)
|
len(result)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
if (category=="holdem" or category=="omahahi" or category=="omahahilo"):
|
if category=="holdem" or category=="omahahi" or category=="omahahilo":
|
||||||
max_seats=10
|
max_seats=10
|
||||||
|
base="hold"
|
||||||
else:
|
else:
|
||||||
max_seats=8
|
max_seats=8
|
||||||
|
base="stud"
|
||||||
|
|
||||||
|
if category=="holdem" or category=="omahahi" or category=="studhi":
|
||||||
|
hiLo='h'
|
||||||
|
elif category=="razz":
|
||||||
|
hiLo='l'
|
||||||
|
else:
|
||||||
|
hiLo='s'
|
||||||
|
|
||||||
if (limit_type=="fl"):
|
if (limit_type=="fl"):
|
||||||
big_blind=small_bet #todo: read this
|
big_blind=small_bet #todo: read this
|
||||||
small_blind=big_blind/2 #todo: read this
|
small_blind=big_blind/2 #todo: read this
|
||||||
cursor.execute("""INSERT INTO Gametypes
|
cursor.execute("""INSERT INTO Gametypes
|
||||||
(siteId, type, category, limitType, smallBlind, bigBlind, smallBet, bigBet)
|
(siteId, type, base, category, limitType, hiLo, smallBlind, bigBlind, smallBet, bigBet)
|
||||||
VALUES (%s, %s, %s, %s, %s, %s, %s, %s)""", (site_id, type, category, limit_type, small_blind, big_blind, small_bet, big_bet))
|
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""", (site_id, type, base, category, limit_type, hiLo, small_blind, big_blind, small_bet, big_bet))
|
||||||
cursor.execute ("SELECT id FROM Gametypes WHERE siteId=%s AND type=%s AND category=%s AND limitType=%s AND smallBet=%s AND bigBet=%s", (site_id, type, category, limit_type, small_bet, big_bet))
|
cursor.execute ("SELECT id FROM Gametypes WHERE siteId=%s AND type=%s AND category=%s AND limitType=%s AND smallBet=%s AND bigBet=%s", (site_id, type, category, limit_type, small_bet, big_bet))
|
||||||
else:
|
else:
|
||||||
cursor.execute("""INSERT INTO Gametypes
|
cursor.execute("""INSERT INTO Gametypes
|
||||||
(siteId, type, category, limitType, smallBlind, bigBlind, smallBet, bigBet)
|
(siteId, type, category, limitType, smallBlind, bigBlind, smallBet, bigBet)
|
||||||
VALUES (%s, %s, %s, %s, %s, %s, %s, %s)""", (site_id, type, category, limit_type, small_bet, big_bet, 0, 0))#remember, for these bet means blind
|
VALUES (%s, %s, %s, %s, %s, %s, %s, %s)""", (site_id, type, base, category, limit_type, hiLo, small_bet, big_bet, 0, 0))#remember, for these bet means blind
|
||||||
cursor.execute ("SELECT id FROM Gametypes WHERE siteId=%s AND type=%s AND category=%s AND limitType=%s AND smallBlind=%s AND bigBlind=%s", (site_id, type, category, limit_type, small_bet, big_bet))
|
cursor.execute ("SELECT id FROM Gametypes WHERE siteId=%s AND type=%s AND category=%s AND limitType=%s AND smallBlind=%s AND bigBlind=%s", (site_id, type, category, limit_type, small_bet, big_bet))
|
||||||
|
|
||||||
result=cursor.fetchone()
|
result=cursor.fetchone()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user