Merge branch 'master' of git://git.assembla.com/fpdboz.git
This commit is contained in:
commit
73ae88e47a
|
@ -1,8 +1,8 @@
|
|||
free-poker-tools (0.12-1) unstable; urgency=low
|
||||
free-poker-tools (0.12~git20100122) unstable; urgency=low
|
||||
|
||||
* New release
|
||||
* New snapshot release with reworked import code
|
||||
|
||||
-- Mika Bostrom <bostik+fpdb@bostik.iki.fi> Mon, 26 Oct 2009 17:49:07 +0200
|
||||
-- Mika Bostrom <bostik+fpdb@bostik.iki.fi> Fri, 22 Jan 2010 09:25:27 +0200
|
||||
|
||||
free-poker-tools (0.11.3+git20091023) unstable; urgency=low
|
||||
|
||||
|
|
|
@ -360,28 +360,6 @@ class Database:
|
|||
cards['common'] = c.fetchone()
|
||||
return cards
|
||||
|
||||
def convert_cards(self, d):
|
||||
ranks = ('', '', '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K', 'A')
|
||||
cards = ""
|
||||
for i in xrange(1, 8):
|
||||
# key = 'card' + str(i) + 'Value'
|
||||
# if not d.has_key(key): continue
|
||||
# if d[key] == None:
|
||||
# break
|
||||
# elif d[key] == 0:
|
||||
# cards += "xx"
|
||||
# else:
|
||||
# cards += ranks[d['card' + str(i) + 'Value']] + d['card' +str(i) + 'Suit']
|
||||
cv = "card%dvalue" % i
|
||||
if cv not in d or d[cv] is None:
|
||||
break
|
||||
elif d[cv] == 0:
|
||||
cards += "xx"
|
||||
else:
|
||||
cs = "card%dsuit" % i
|
||||
cards = "%s%s%s" % (cards, ranks[d[cv]], d[cs])
|
||||
return cards
|
||||
|
||||
def get_action_from_hand(self, hand_no):
|
||||
action = [ [], [], [], [], [] ]
|
||||
c = self.connection.cursor()
|
||||
|
|
|
@ -192,7 +192,7 @@ dealt whether they were seen in a 'dealt to' line
|
|||
self.holecards[street][player] = [open, closed]
|
||||
|
||||
def prepInsert(self, db):
|
||||
#####
|
||||
#####
|
||||
# Players, Gametypes, TourneyTypes are all shared functions that are needed for additional tables
|
||||
# These functions are intended for prep insert eventually
|
||||
#####
|
||||
|
@ -683,7 +683,6 @@ class HoldemOmahaHand(Hand):
|
|||
|
||||
def join_holecards(self, player, asList=False):
|
||||
"""With asList = True it returns the set cards for a player including down cards if they aren't know"""
|
||||
# FIXME: This should actually return
|
||||
hcs = [u'0x', u'0x', u'0x', u'0x']
|
||||
|
||||
for street in self.holeStreets:
|
||||
|
|
|
@ -457,9 +457,7 @@ class Hud:
|
|||
# TODO: is stat_windows getting converted somewhere from a list to a dict, for no good reason?
|
||||
for i, w in enumerate(self.stat_windows.itervalues()):
|
||||
(x, y) = loc[adj[i+1]]
|
||||
px = int(x * self.table.width / 1000)
|
||||
py = int(y * self.table.height / 1000)
|
||||
w.relocate(px, py)
|
||||
w.relocate(x, y)
|
||||
|
||||
# While we're at it, fix the positions of mucked cards too
|
||||
for aux in self.aux_windows:
|
||||
|
@ -509,11 +507,9 @@ class Hud:
|
|||
|
||||
def save_layout(self, *args):
|
||||
new_layout = [(0, 0)] * self.max
|
||||
width = self.table.width
|
||||
height = self.table.height
|
||||
for sw in self.stat_windows:
|
||||
(x,y) = self.stat_windows[sw].window.get_position()
|
||||
new_loc = (int((x - self.table.x)*1000/width), int((y - self.table.y)*1000/height))
|
||||
loc = self.stat_windows[sw].window.get_position()
|
||||
new_loc = (loc[0] - self.table.x, loc[1] - self.table.y)
|
||||
new_layout[self.stat_windows[sw].adj - 1] = new_loc
|
||||
self.config.edit_layout(self.table.site, self.max, locations = new_layout)
|
||||
# ask each aux to save its layout back to the config object
|
||||
|
@ -575,21 +571,16 @@ class Hud:
|
|||
loc = self.config.get_locations(self.table.site, 9)
|
||||
|
||||
# create the stat windows
|
||||
# get the width and height of the client window
|
||||
# The x and Y positions are now made relative.
|
||||
|
||||
for i in xrange(1, self.max + 1):
|
||||
(x, y) = loc[adj[i]]
|
||||
px = int(x * self.table.width / 1000)
|
||||
py = int(y * self.table.height / 1000)
|
||||
if i in self.stat_windows:
|
||||
self.stat_windows[i].relocate(px, py)
|
||||
self.stat_windows[i].relocate(x, y)
|
||||
else:
|
||||
self.stat_windows[i] = Stat_Window(game = config.supported_games[self.poker_game],
|
||||
parent = self,
|
||||
table = self.table,
|
||||
x = px,
|
||||
y = py,
|
||||
x = x,
|
||||
y = y,
|
||||
seat = i,
|
||||
adj = adj[i],
|
||||
player_id = 'fake',
|
||||
|
@ -685,9 +676,11 @@ class Stat_Window:
|
|||
return True
|
||||
|
||||
if event.button == 1: # left button event
|
||||
# close on double click for a stat window
|
||||
# for those that don't have a mouse with middle button
|
||||
if event.type == gtk.gdk._2BUTTON_PRESS:
|
||||
self.window.hide()
|
||||
return True
|
||||
self.window.hide()
|
||||
return True
|
||||
# TODO: make position saving save sizes as well?
|
||||
if event.state & gtk.gdk.SHIFT_MASK:
|
||||
self.window.begin_resize_drag(gtk.gdk.WINDOW_EDGE_SOUTH_EAST, event.button, int(event.x_root), int(event.y_root), event.time)
|
||||
|
|
Loading…
Reference in New Issue
Block a user