p93 - unbet now stores a negative amount since that's what it is

This commit is contained in:
steffen123 2008-09-22 22:12:03 +01:00
parent 8364d998f2
commit 4e8a09ff84
4 changed files with 7 additions and 4 deletions

View File

@ -744,7 +744,7 @@ The program itself is licensed under AGPLv3, see agpl-3.0.txt</p>
<TR VALIGN=TOP>
<TD><P>action</P></TD>
<TD><P>char(5)</P></TD>
<TD><P>Bet stands for bring in, complete, bet, double bet, raise and double raise, since they all - technically - do the same thing. Unbet is used for when an uncalled bet is returned.</P>
<TD><P>Bet stands for bring in, complete, bet, double bet, raise and double raise, since they all - technically - do the same thing. Unbet is used for when an uncalled bet is returned, this will have a negative value for amount.</P>
<P>Other valid values: blind call check fold</P></TD>
</TR>
<TR VALIGN=TOP>

View File

@ -57,7 +57,7 @@ class GuiGraphViewer (threading.Thread):
self.cursor.execute("""SELECT handId, winnings FROM HandsPlayers
INNER JOIN Players ON HandsPlayers.playerId = Players.id
INNER JOIN Hands ON Hands.id = HandsPlayers.handId
WHERE Players.name = %s AND Players.siteId = %s
WHERE Players.name = %s AND Players.siteId = %s AND tourneysPlayersId is NULL
ORDER BY siteHandNo""", (name, site))
winnings = self.db.cursor.fetchall()
@ -66,7 +66,7 @@ class GuiGraphViewer (threading.Thread):
self.cursor.execute("""SELECT SUM(amount) FROM HandsActions
INNER JOIN HandsPlayers ON HandsActions.handPlayerId = HandsPlayers.id
INNER JOIN Players ON HandsPlayers.playerId = Players.id
WHERE Players.name = %s AND HandsPlayers.handId = %s AND Players.siteId = %s""", (name, winnings[i][0], site))
WHERE Players.name = %s AND HandsPlayers.handId = %s AND Players.siteId = %s AND tourneysPlayersId is NULL""", (name, winnings[i][0], site))
spent = self.db.cursor.fetchone()
profit[i]=(i, winnings[i][1]-spent[0])

View File

@ -417,7 +417,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: alpha4+, p89 or higher")
self.window.set_title("Free Poker DB - version: alpha4+, p93 or higher")
self.window.set_border_width(1)
self.window.set_size_request(1020,400)
self.window.set_resizable(True)

View File

@ -581,6 +581,9 @@ def parseActionAmount(line, atype, site):
#print "pos:",pos
#print "pos of 20:", line.find("20")
amount=int(line[pos:])
if atype=="unbet":
amount*=-1
return amount
#end def parseActionAmount