git13 - tv now displays the data over a range of activeSeats. see table_viewer.py lines 75-84 for ranges.
added version string to GUI made GUI a bit wider to accomodate wider t
This commit is contained in:
		
							parent
							
								
									5ee5594741
								
							
						
					
					
						commit
						9ca400b4ab
					
				| 
						 | 
				
			
			@ -86,6 +86,7 @@ benchmark properly on mysql innodb, mysql myisam, postgresql, sqlite, more?
 | 
			
		|||
rename things like this: ClassName.methodName and variableName. do this on tables too. update codingstyle
 | 
			
		||||
CLI (not ncurses, proper CLI) equivalent for fpdb.py
 | 
			
		||||
optimise/simplify storing by creating the SQL statements depending on hand rather than calling different methods
 | 
			
		||||
make range of activeSeats configurable for tv/hud
 | 
			
		||||
 | 
			
		||||
License
 | 
			
		||||
=======
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -343,9 +343,9 @@ blabla""")
 | 
			
		|||
		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: pre-alpha, git12")
 | 
			
		||||
		self.window.set_title("Free Poker DB - version: pre-alpha, git13")
 | 
			
		||||
		self.window.set_border_width(1)
 | 
			
		||||
		self.window.set_size_request(600,400)
 | 
			
		||||
		self.window.set_size_request(700,400)
 | 
			
		||||
		self.window.set_resizable(True)
 | 
			
		||||
		
 | 
			
		||||
		self.menu_items = (
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -71,8 +71,36 @@ class table_viewer (threading.Thread):
 | 
			
		|||
			tmp=[]
 | 
			
		||||
			tmp.append(self.player_names[player][0])
 | 
			
		||||
			
 | 
			
		||||
			self.cursor.execute("SELECT * FROM HudDataHoldemOmaha WHERE gametypeId=%s AND playerId=%s AND activeSeats=%s", (self.gametype_id, self.player_ids[player][0], len(self.player_names)))
 | 
			
		||||
			row=self.cursor.fetchone()
 | 
			
		||||
			seatCount=len(self.player_names)
 | 
			
		||||
			if seatCount>=8:
 | 
			
		||||
				minSeats,maxSeats=7,10
 | 
			
		||||
			elif seatCount==7:
 | 
			
		||||
				minSeats,maxSeats=6,9
 | 
			
		||||
			elif seatCount==6 or seatCount==5:
 | 
			
		||||
				minSeats,maxSeats=seatCount-1,seatCount+1
 | 
			
		||||
			elif seatCount==4:
 | 
			
		||||
				minSeats,maxSeats=4,5
 | 
			
		||||
			elif seatCount==2 or seatCount==3:
 | 
			
		||||
				minSeats,maxSeats=seatCount,seatCount
 | 
			
		||||
			else:
 | 
			
		||||
				fpdb_simple.FpdbError("invalid seatCount")
 | 
			
		||||
			
 | 
			
		||||
			self.cursor.execute("SELECT * FROM HudDataHoldemOmaha WHERE gametypeId=%s AND playerId=%s AND activeSeats>=%s AND activeSeats<=%s", (self.gametype_id, self.player_ids[player][0], minSeats, maxSeats))
 | 
			
		||||
			rows=self.cursor.fetchall()
 | 
			
		||||
			
 | 
			
		||||
			row=[]
 | 
			
		||||
			for field_no in range(len(rows[0])):
 | 
			
		||||
				row.append(rows[0][field_no])
 | 
			
		||||
			
 | 
			
		||||
			for row_no in range(len(rows)):
 | 
			
		||||
				if row_no==0:
 | 
			
		||||
					pass
 | 
			
		||||
				else:
 | 
			
		||||
					for field_no in range(len(rows[row_no])):
 | 
			
		||||
						if field_no<=3:
 | 
			
		||||
							pass
 | 
			
		||||
						else:
 | 
			
		||||
							row[field_no]+=rows[row_no][field_no]
 | 
			
		||||
			
 | 
			
		||||
			tmp.append(str(row[4]))#Hands
 | 
			
		||||
			tmp.append(self.hudDivide(row[5],row[4])) #VPIP
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user