[Python-apps-commits] r6723 - in packages/freealchemist/trunk/debian (5 files)

dfiloni-guest at users.alioth.debian.org dfiloni-guest at users.alioth.debian.org
Fri Mar 4 16:16:35 UTC 2011


    Date: Friday, March 4, 2011 @ 16:16:29
  Author: dfiloni-guest
Revision: 6723

New release.

Modified:
  packages/freealchemist/trunk/debian/changelog
  packages/freealchemist/trunk/debian/control
  packages/freealchemist/trunk/debian/copyright
  packages/freealchemist/trunk/debian/patches/02_extend_explode.patch
Deleted:
  packages/freealchemist/trunk/debian/watch

Modified: packages/freealchemist/trunk/debian/changelog
===================================================================
--- packages/freealchemist/trunk/debian/changelog	2011-03-04 08:26:57 UTC (rev 6722)
+++ packages/freealchemist/trunk/debian/changelog	2011-03-04 16:16:29 UTC (rev 6723)
@@ -1,10 +1,18 @@
-freealchemist (0.4-4) UNRELEASED; urgency=low
+freealchemist (0.4-4) unstable; urgency=low
 
-  * debian/control
-    - switch Vcs-Browser field to viewsvn
+  [Sandro Tosi]
+  * debian/control: switch Vcs-Browser field to viewsvn.
 
- -- Sandro Tosi <morph at debian.org>  Sun, 15 Feb 2009 18:10:52 +0100
+  [Devid Antonio Filoni]
+  * Update 02_extend_explode.patch to fix some bugs in the explosion handling,
+    patch by Bas Wijnen <wijnen at debian.org> (Closes: #597401).
+  * Remove not-working-anymore debian/watch file.
+  * debian/control: remove Homepage field.
+  * Fix missing-debian-source-format lintian info.
+  * Bump Standards-Version to 3.9.1.
 
+ -- Devid Antonio Filoni <d.filoni at ubuntu.com>  Fri, 04 Mar 2011 16:21:08 +0100
+
 freealchemist (0.4-3) unstable; urgency=low
 
   * Fix "debhelper-but-no-misc-depends" lintian warning.

Modified: packages/freealchemist/trunk/debian/control
===================================================================
--- packages/freealchemist/trunk/debian/control	2011-03-04 08:26:57 UTC (rev 6722)
+++ packages/freealchemist/trunk/debian/control	2011-03-04 16:16:29 UTC (rev 6723)
@@ -5,8 +5,7 @@
 Uploaders: Python Applications Packaging Team <python-apps-team at lists.alioth.debian.org>
 Build-Depends: cdbs, debhelper (>= 5)
 Build-Depends-Indep: python-support (>= 0.5.3)
-Standards-Version: 3.8.0
-Homepage: http://dak.netsons.org/Projects/FreeAlchemist/index.htm
+Standards-Version: 3.9.1
 Vcs-Svn: svn://svn.debian.org/python-apps/packages/freealchemist/trunk/
 Vcs-Browser: http://svn.debian.org/viewsvn/python-apps/packages/freealchemist/trunk/
 

Modified: packages/freealchemist/trunk/debian/copyright
===================================================================
--- packages/freealchemist/trunk/debian/copyright	2011-03-04 08:26:57 UTC (rev 6722)
+++ packages/freealchemist/trunk/debian/copyright	2011-03-04 16:16:29 UTC (rev 6723)
@@ -9,7 +9,7 @@
 
 Copyright: 
 
-    Copyright (C) 2008 Dak <dak.linux at gmail.com>
+    Copyright © 2008 Dak <dak.linux at gmail.com>
 
 License:
 
@@ -30,5 +30,5 @@
 On Debian systems, the complete text of the GNU General
 Public License can be found in `/usr/share/common-licenses/GPL'.
 
-The Debian packaging is (C) 2008, Devid Antonio Filoni <d.filoni at ubuntu.com> and
+The Debian packaging is © 2008, Devid Antonio Filoni <d.filoni at ubuntu.com> and
 is licensed under the GPL, see above.

Modified: packages/freealchemist/trunk/debian/patches/02_extend_explode.patch
===================================================================
--- packages/freealchemist/trunk/debian/patches/02_extend_explode.patch	2011-03-04 08:26:57 UTC (rev 6722)
+++ packages/freealchemist/trunk/debian/patches/02_extend_explode.patch	2011-03-04 16:16:29 UTC (rev 6723)
@@ -1,7 +1,7 @@
-diff -Nurp freealchemist-0.4.orig/freealchemist.py freealchemist-0.4/freealchemist.py
---- freealchemist-0.4.orig/freealchemist.py	2009-02-15 13:52:52.000000000 +0100
-+++ freealchemist-0.4/freealchemist.py	2009-02-15 13:53:04.000000000 +0100
-@@ -33,6 +33,8 @@ import sys
+diff -Nur -x '*.orig' -x '*~' freealchemist-0.4//freealchemist.py freealchemist-0.4.new//freealchemist.py
+--- freealchemist-0.4//freealchemist.py	2010-09-19 20:41:26.000000000 +0200
++++ freealchemist-0.4.new//freealchemist.py	2010-09-19 20:45:25.000000000 +0200
+@@ -33,6 +33,8 @@
  import random
  
  width = 6
@@ -10,7 +10,7 @@
  
  class freealchemist:
  	def __init__(self):
-@@ -95,9 +97,9 @@ class freealchemist:
+@@ -95,9 +97,9 @@
  		# Riempie la griglia
  		self.grid = []
  
@@ -22,7 +22,7 @@
  				line.append(0)			
  			self.grid.append(line)
  
-@@ -118,7 +120,7 @@ class freealchemist:
+@@ -118,15 +120,19 @@
  
  		if random.randint(1,30) == 25: 
  			self.nextblock = [[random.randint(14,16),random.randint(1,self.lim)],[0,0]]
@@ -30,13 +30,80 @@
 +		else:			
  			self.nextblock = [[random.randint(1,self.lim),random.randint(1,self.lim)],[0,0]]
  
- 						
-@@ -182,12 +184,12 @@ class freealchemist:
+-						
++	def onBoard(self, x, y):
++		return x >= 0 and x < len(self.grid) and y >= 0 and y < len(self.grid[0])
++
++	def test(self, x, y, dx1, dy1, dx2, dy2, t):
++		return self.onBoard(x+dx1,y+dy1) and self.onBoard(x+dx2,y+dy2) and self.grid[x+dx1][y+dy1] == t and self.grid[x+dx2][y+dy2] == t
+ 			
+ 	def updateGame(self):
+ 		# Controlla se ci son spazi vuoti da riempire
+ 		md = False
+-		for x in xrange(len(self.grid)-1,0,-1):
++		for x in xrange(len(self.grid)-1,-1,-1):
+ 			for y in xrange(0, len(self.grid[0])):
+ 				s = 0
+ 				for a in xrange(len(self.grid)): s += self.grid[a][y]
+@@ -141,8 +147,8 @@
+ 
+ 		# Controlliamo se possiamo far esplodere qualcosa :P
+ 		if not self.mov:
+-			for x in xrange(-1,len(self.grid)-1):		
+-				for y in xrange(-1,len(self.grid[0])-1):
++			for x in xrange(0,len(self.grid)):		
++				for y in xrange(0,len(self.grid[0])):
+ 					# La pressa
+ 					if self.grid[x][y] == 15 and x == len(self.grid)-2:
+ 							self.grid[len(self.grid)-2][y] = 0
+@@ -156,38 +162,37 @@
+ 					# Bomba 1
+ 					elif self.grid[x][y] == 14:
+ 						self.grid[x][y] = 0
+-						if y-1 != -1:			self.grid[x][y-1] = 0
+-						if y+1 < len(self.grid[0]):	self.grid[x][y+1] = 0
+-						if x+1 < len(self.grid): 	self.grid[x+1][y] = 0
+-						if x-1 != -1:		 	self.grid[x-1][y] = 0
++						if self.onBoard (x,y-1):	self.grid[x][y-1] = 0
++						if self.onBoard (x,y+1):	self.grid[x][y+1] = 0
++						if self.onBoard (x+1,y): 	self.grid[x+1][y] = 0
++						if self.onBoard (x-1,y): 	self.grid[x-1][y] = 0
+ 
+ 					# Bomba 2
+ 					elif self.grid[x][y] == 16:
+ 						self.grid[x][y] = 0
+-						if y-1 != -1:			self.grid[x][y-1] = 0
+-						if y+1 < len(self.grid[0]):	self.grid[x][y+1] = 0
+-						if x+1 < len(self.grid): 	self.grid[x+1][y] = 0
+-						if x-1 != -1:		 	self.grid[x-1][y] = 0
+-						if y-1 != -1 and x-1 != -1:					self.grid[x-1][y-1] = 0
+-						if y+1 < len(self.grid[0]) and x+1 < len(self.grid):		self.grid[x+1][y+1] = 0
+-						if x+1 < len(self.grid) and y-1 != -1: 				self.grid[x+1][y-1] = 0
+-						if x-1 != -1 and y+1 < len(self.grid[0]):		 	self.grid[x-1][y+1] = 0
+-						if y-2 != -2:			self.grid[x][y-2] = 0
+-						if y+2 < len(self.grid[0]):	self.grid[x][y+2] = 0
+-						if x+2 < len(self.grid): 	self.grid[x+2][y] = 0
+-						if x-2 != -2:		 	self.grid[x-2][y] = 0
++						if self.onBoard (x,y-1):	self.grid[x][y-1] = 0
++						if self.onBoard (x,y+1):	self.grid[x][y+1] = 0
++						if self.onBoard (x+1,y):	self.grid[x+1][y] = 0
++						if self.onBoard (x-1,y):	self.grid[x-1][y] = 0
++						if self.onBoard (x-1,y-1):	self.grid[x-1][y-1] = 0
++						if self.onBoard (x+1,y+1):	self.grid[x+1][y+1] = 0
++						if self.onBoard (x+1,y-1):	self.grid[x+1][y-1] = 0
++						if self.onBoard (x-1,y+1):	self.grid[x-1][y+1] = 0
++						if self.onBoard (x,y-2):	self.grid[x][y-2] = 0
++						if self.onBoard (x,y+2):	self.grid[x][y+2] = 0
++						if self.onBoard (x+2,y):	self.grid[x+2][y] = 0
++						if self.onBoard (x-2,y):	self.grid[x-2][y] = 0
+ 
+ 
+ 					# Normale
  					elif self.grid[x][y] != 0 and self.grid[x][y] < 13:
  						t = self.grid[x][y]
- 						if (self.grid[x][y+1] == t and self.grid[x][y-1] == t) or (self.grid[x+1][y] == t and self.grid[x-1][y] == t) or (self.grid[x+1][y] == t and self.grid[x][y+1] == t) or (self.grid[x-1][y] == t and self.grid[x][y-1] == t)  or (self.grid[x-1][y] == t and self.grid[x][y+1] == t) or (self.grid[x+1][y] == t and self.grid[x][y-1] == t): 
+-						if (self.grid[x][y+1] == t and self.grid[x][y-1] == t) or (self.grid[x+1][y] == t and self.grid[x-1][y] == t) or (self.grid[x+1][y] == t and self.grid[x][y+1] == t) or (self.grid[x-1][y] == t and self.grid[x][y-1] == t)  or (self.grid[x-1][y] == t and self.grid[x][y+1] == t) or (self.grid[x+1][y] == t and self.grid[x][y-1] == t): 
 -								if self.grid[x][y] < 12: self.grid[x][y] += 1
-+								
++						if self.test (x, y, 0, 1, 0, -1, t) or self.test (x, y, 1, 0, -1, 0, t) or self.test (x, y, 1, 0, 0, 1, t) or self.test (x, y, -1, 0, 0, -1, t) or self.test (x, y, -1, 0, 0, 1, t) or self.test (x, y, 1, 0, 0, -1, t):
 +								#upgrade our center piece
 +								if t < 12: self.grid[x][y] += 1
  								else: self.grid[x][y] = 0
@@ -49,7 +116,7 @@
  								self.points += (t*10)+t*t
  
  						if t-1 > self.lim and t-1 < 13: self.lim += 1
-@@ -204,7 +206,28 @@ class freealchemist:
+@@ -204,7 +209,23 @@
  			elif sum(self.grid[1]) > 0: self.fail += 1
  			else: self.fail = 0 
  		if self.fail > 2: self.over = True
@@ -58,20 +125,15 @@
 +	
 +	#Explode the piece at position x,y if type == t
 +	#and also explode all touching pieces of the same type.
-+	def explode(self,xx,y,t) :
-+		#sometimes xx is -1. It's a bug we workaround here
-+		if xx == -1 :
-+			x = size_x - 1
-+		else :
-+			x = xx
++	def explode(self,x,y,t) :
 +		if self.grid[x][y] == t :
 +			self.grid[x][y] = 0
 +		#recursively explode touching pieces of the same type
-+		if (y >= 0) :
++		if (y > 0) :
 +			if self.grid[x][y-1] == t: self.explode(x,y-1,t)
 +		if (y < len(self.grid[0])-1) :
 +			if self.grid[x][y+1] == t: self.explode(x,y+1,t)
-+		if (x >= 0) :
++		if (x > 0) :
 +			if self.grid[x-1][y] == t: self.explode(x-1,y,t)
 +		if  (x < len(self.grid)-1) :
 + 			if self.grid[x+1][y] == t: self.explode(x+1,y,t)

Deleted: packages/freealchemist/trunk/debian/watch
===================================================================
--- packages/freealchemist/trunk/debian/watch	2011-03-04 08:26:57 UTC (rev 6722)
+++ packages/freealchemist/trunk/debian/watch	2011-03-04 16:16:29 UTC (rev 6723)
@@ -1,2 +0,0 @@
-version=3
-http://dak.netsons.org/Projects/FreeAlchemist/index.htm relase/freealchemist(.*)\.tar\.gz




More information about the Python-apps-commits mailing list