Your message dated Sat, 05 Mar 2011 18:33:14 +0000
with message-id <[email protected]>
and subject line Bug#597401: fixed in freealchemist 0.4-4
has caused the Debian Bug report #597401,
regarding freealchemist: Incorrect explosions
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
597401: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=597401
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: freealchemist
Version: 0.4-3
Severity: normal
Tag: patch

There are some bugs in the explosion handling.  Explosions on the far
left side can include tiles from the far right side.  Sometimes tiles
help to start an explosion, but they don't explode.  It all happens
becuase of incorrect bounds in loops and checks.

I've attached a patch which fixes this.  Because it fixes the problem,
I've also removed the workaround for negative coordinates (which was
buggy anyway).

Finally, I didn't do anything about it, but find it highly confusing
that the vertical coordinate is called "x" and the horizontal coordinate
is called "y"...

Thanks,
Bas
diff -urp freealchemist-0.4.orig/debian/patches/02_extend_explode.patch freealchemist-0.4/debian/patches/02_extend_explode.patch
--- freealchemist-0.4.orig/debian/patches/02_extend_explode.patch	2010-09-19 13:33:33.000000000 +0200
+++ freealchemist-0.4/debian/patches/02_extend_explode.patch	2010-09-19 13:32:06.000000000 +0200
@@ -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 12:30:52.000000000 +0200
++++ freealchemist-0.4.new/freealchemist.py	2010-09-19 13:27:45.000000000 +0200
+@@ -33,6 +33,8 @@
  import random
  
  width = 6
@@ -10,7 +10,7 @@ diff -Nurp freealchemist-0.4.orig/freeal
  
  class freealchemist:
  	def __init__(self):
-@@ -95,9 +97,9 @@ class freealchemist:
+@@ -95,9 +97,9 @@
  		# Riempie la griglia
  		self.grid = []
  
@@ -22,7 +22,7 @@ diff -Nurp freealchemist-0.4.orig/freeal
  				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,39 @@ diff -Nurp freealchemist-0.4.orig/freeal
 +		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
+@@ -181,13 +187,12 @@
+ 					# 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 +75,7 @@ diff -Nurp freealchemist-0.4.orig/freeal
  								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 +84,15 @@ diff -Nurp freealchemist-0.4.orig/freeal
 +	
 +	#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)

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
Source: freealchemist
Source-Version: 0.4-4

We believe that the bug you reported is fixed in the latest version of
freealchemist, which is due to be installed in the Debian FTP archive:

freealchemist_0.4-4.diff.gz
  to main/f/freealchemist/freealchemist_0.4-4.diff.gz
freealchemist_0.4-4.dsc
  to main/f/freealchemist/freealchemist_0.4-4.dsc
freealchemist_0.4-4_all.deb
  to main/f/freealchemist/freealchemist_0.4-4_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Devid Antonio Filoni <[email protected]> (supplier of updated freealchemist 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 04 Mar 2011 16:21:08 +0100
Source: freealchemist
Binary: freealchemist
Architecture: source all
Version: 0.4-4
Distribution: unstable
Urgency: low
Maintainer: Devid Antonio Filoni <[email protected]>
Changed-By: Devid Antonio Filoni <[email protected]>
Description: 
 freealchemist - simpler figure block game
Closes: 597401
Changes: 
 freealchemist (0.4-4) unstable; urgency=low
 .
   [Sandro Tosi]
   * debian/control: switch Vcs-Browser field to viewsvn.
 .
   [Devid Antonio Filoni]
   * Update 02_extend_explode.patch to fix some bugs in the explosion handling,
     patch by Bas Wijnen <[email protected]> (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.
Checksums-Sha1: 
 16167ec74277e441ec88ce0d051bf09512ee8b85 1921 freealchemist_0.4-4.dsc
 5ba6d8a10ce6fade61f7658b995f493368d1763f 7524 freealchemist_0.4-4.diff.gz
 041c723d94ac23b0060774b47c5a0e7f53e4a02b 69232 freealchemist_0.4-4_all.deb
Checksums-Sha256: 
 3babe52e304f6e80b2ab069f535d6c09f2756d3194e8f4e208a551ca8329a61e 1921 
freealchemist_0.4-4.dsc
 2ac787c42897689b3f2d94bd273eec9de250e10da378f3611bc4075bd238b357 7524 
freealchemist_0.4-4.diff.gz
 b35750b3abc98637be5d8def6db7a12b8157cae57c355356ae21b47922e356be 69232 
freealchemist_0.4-4_all.deb
Files: 
 e2de618e0c4cb9d877f94c5d0c9ee130 1921 games optional freealchemist_0.4-4.dsc
 62fe0802f7bdb178970c8c9ba803c0e7 7524 games optional 
freealchemist_0.4-4.diff.gz
 da215c908bd877b97cc510a10a4912d7 69232 games optional 
freealchemist_0.4-4_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJNcn2dAAoJEK728aKnRXZFAj8QALZsVo9ybshKKvgcrqNgutf/
EtVUAGtkLiwvlo9BMngvYZDLHQFPpBz/lZy15sPXyL5GZYOLwG8BUTv2aLK1ahSp
iTWEz/EB8QvvlWyax7LbsaaNEWsAmXBRz1EMoURCCU90LkaFLhfwGeqpgGfkAJJc
rzWLHHfyiDFjtc3aYp46ACrqCdY5xcCwATr9sCjT80+3XbxEjAO4xFH1CepKgVig
denTSM9hRI1jpFwB6QLbL3omWXWYuTLAFwVrywbMg29AQhqR3RIGvnE8FAQg4+/K
xtt6dXV9QNpRy8PzaFAOIvIpqljpRVmZXE7AWU4cBZxP9KL7Gdjt3v1uLMHLZs9y
M1MvqKnG++5EnyIQwN9FN2P0JaGmPN0NMxtgR7MiV7VJjpIIOCIXq21HmgFbQd53
Xk3FdkKOv/HpZjOUl3Amst0Bc8xCeFhq6tmctO3BKQ6xVRyEChmaoN8/RbWsBnUv
D8oObBg5hFjn+I/JnqDN1xynIDoQ/dIWZ3arGnnlcZUxS7wG3eoL9Un7Xoc27EnO
Wp7LTSDwU6w1fpGKEno17zw4ybcEPMFO/mw83mq2RzLVQbilDwQHN0lxYz8v5tPM
Amrs6+WMW+1tFdaazP37vMu9L9MBH9vnJGUwzw3mbj6qenV0enGIixhNFYn8zWPN
zkxJbuWoNzlnPOuU7c0i
=Iefs
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to