Merge branch 'master' of git://git.assembla.com/fpdb-eric

This commit is contained in:
Eratosthenes 2009-12-04 12:16:26 -05:00
commit 2863edf1df
4 changed files with 318 additions and 319 deletions

View File

@ -358,7 +358,7 @@ class Hud:
def change_max_seats(self, widget):
if self.max != widget.ms:
print 'change_max_seats', widget.ms
#print 'change_max_seats', widget.ms
self.max = widget.ms
try:
self.kill()
@ -678,7 +678,7 @@ class Stat_Window:
return True
def kill_popup(self, popup):
print "remove popup", popup
#print "remove popup", popup
self.popups.remove(popup)
popup.window.destroy()

View File

@ -37,14 +37,20 @@ if os.name == 'nt' and sys.version[0:3] not in ('2.5', '2.6') and '-r' not in sy
os.execvpe('python.exe', ('python.exe', 'fpdb.py', '-r'), os.environ) # first arg is ignored (name of program being run)
else:
print "\npython 2.5 not found, please install python 2.5 or 2.6 for fpdb\n"
exit
raw_input("Press ENTER to continue.")
exit()
else:
pass
#print "debug - not changing path"
if os.name == 'nt':
try:
import win32api
import win32con
except ImportError:
print "We appear to be running in Windows, but the Windows Python Extensions are not loading. Please install the PYWIN32 package from http://sourceforge.net/projects/pywin32/"
raw_input("Press ENTER to continue.")
exit()
print "Python " + sys.version[0:3] + '...\n'
@ -62,9 +68,14 @@ if not options.errorsToConsole:
import logging
try:
import pygtk
pygtk.require('2.0')
import gtk
except:
print "Unable to load PYGTK modules required for GUI. Please install PyCairo, PyGObject, and PyGTK from www.pygtk.org."
raw_input("Press ENTER to continue.")
exit()
import interlocks
@ -196,14 +207,14 @@ class fpdb:
def dia_about(self, widget, data=None):
#self.warning_box("About FPDB:\n\nFPDB was originally created by a guy named Steffen, sometime in 2008, \nand is mostly worked on these days by people named Eratosthenes, s0rrow, _mt, EricBlade, sqlcoder, and other strange people.\n\n", "ABOUT FPDB")
dia = gtk.AboutDialog()
dia.set_name("FPDB")
dia.set_name("Free Poker Database (FPDB)")
dia.set_version(VERSION)
dia.set_copyright("2008-2009, Steffen, Eratosthenes, s0rrow, EricBlade, _mt, sqlcoder, and others")
dia.set_copyright("2008-2010, Steffen, Eratosthenes, s0rrow, EricBlade, _mt, sqlcoder, Bostik, and others")
dia.set_comments("GTK AboutDialog comments here")
dia.set_license("GPL v3")
dia.set_website("http://fpdb.sourceforge.net/")
dia.set_authors("Steffen, Eratosthenes, s0rrow, EricBlade, _mt, and others")
dia.set_program_name("FPDB")
dia.set_authors("Steffen, Eratosthenes, s0rrow, EricBlade, _mt, sqlcoder, Bostik, and others")
dia.set_program_name("Free Poker Database (FPDB)")
dia.run()
dia.destroy()

View File

@ -1241,38 +1241,34 @@ sure to also change the following storage method and table_viewer.prepare_data i
#calculate saw* values
isAllIn = False
if any(i for i in allIns[0][player]):
isAllIn = True
if (len(action_types[1][player])>0 or isAllIn):
isAllIn = any(i for i in allIns[0][player])
if isAllIn or len(action_types[1][player]) > 0:
myStreet1Seen = True
if any(i for i in allIns[1][player]):
isAllIn = True
if (len(action_types[2][player])>0 or isAllIn):
if not isAllIn:
isAllIn = any(i for i in allIns[1][player])
elif len(action_types[2][player]) > 0:
if all(actiontype != "fold" for actiontype in action_types[1][player]):
myStreet2Seen = True
if any(i for i in allIns[2][player]):
isAllIn = True
if (len(action_types[3][player])>0 or isAllIn):
if not isAllIn:
isAllAin = any(i for i in allIns[2][player])
elif len(action_types[3][player]) > 0:
if all(actiontype != "fold" for actiontype in action_types[2][player]):
myStreet3Seen = True
#print "base:", base
if base == "hold":
mySawShowdown = True
if any(actiontype == "fold" for actiontype in action_types[3][player]):
mySawShowdown = False
mySawShowdown = not any(actiontype == "fold" for actiontype in action_types[3][player])
else:
#print "in else"
if any(i for i in allIns[3][player]):
isAllIn = True
if (len(action_types[4][player])>0 or isAllIn):
if not isAllIn:
isAllIn = any(i for i in allIns[3][player])
elif len(action_types[4][player]) > 0:
#print "in if"
myStreet4Seen = True
mySawShowdown = True
if any(actiontype == "fold" for actiontype in action_types[4][player]):
mySawShowdown = False
mySawShowdown = not any(actiontype == "fold" for actiontype in action_types[4][player])
if myStreet1Seen:
result['playersAtStreet1'] += 1
@ -1288,9 +1284,7 @@ sure to also change the following storage method and table_viewer.prepare_data i
#flop stuff
street = 1
if myStreet1Seen:
if any(actiontype == "bet" for actiontype in action_types[street][player]):
myStreet1Aggr = True
myStreet1Aggr = any(actiontype == "bet" for actiontype in action_types[street][player])
myStreet1Calls = action_types[street][player].count('call')
myStreet1Bets = action_types[street][player].count('bet')
# street1Raises = action_types[street][player].count('raise') bet count includes raises for now
@ -1310,9 +1304,7 @@ sure to also change the following storage method and table_viewer.prepare_data i
#turn stuff - copy of flop with different vars
street = 2
if myStreet2Seen:
if any(actiontype == "bet" for actiontype in action_types[street][player]):
myStreet2Aggr = True
myStreet2Aggr = any(actiontype == "bet" for actiontype in action_types[street][player])
myStreet2Calls = action_types[street][player].count('call')
myStreet2Bets = action_types[street][player].count('bet')
# street2Raises = action_types[street][player].count('raise') bet count includes raises for now
@ -1332,9 +1324,7 @@ sure to also change the following storage method and table_viewer.prepare_data i
#river stuff - copy of flop with different vars
street = 3
if myStreet3Seen:
if any(actiontype == "bet" for actiontype in action_types[street][player]):
myStreet3Aggr = True
myStreet3Aggr = any(actiontype == "bet" for actiontype in action_types[street][player])
myStreet3Calls = action_types[street][player].count('call')
myStreet3Bets = action_types[street][player].count('bet')
# street3Raises = action_types[street][player].count('raise') bet count includes raises for now
@ -1354,9 +1344,7 @@ sure to also change the following storage method and table_viewer.prepare_data i
#stud river stuff - copy of flop with different vars
street = 4
if myStreet4Seen:
if any(actiontype == "bet" for actiontype in action_types[street][player]):
myStreet4Aggr=True
myStreet4Aggr = any(actiontype == "bet" for actiontype in action_types[street][player])
myStreet4Calls = action_types[street][player].count('call')
myStreet4Bets = action_types[street][player].count('bet')
# street4Raises = action_types[street][player].count('raise') bet count includes raises for now