changeset 60:2c4eb84b42bd

Fixing die() call which had wrong arguments. commented out kill_groups2
author Rene Dudfield <renesd@gmail.com>
date Sun, 08 Jul 2012 10:41:23 +0200
parents 1c0b7d337ac0
children 1640501ecaae
files zrpn/board.py
diffstat 1 files changed, 19 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/zrpn/board.py	Sun Jul 08 10:36:53 2012 +0200
+++ b/zrpn/board.py	Sun Jul 08 10:41:23 2012 +0200
@@ -81,7 +81,7 @@
                 x += 1
                 for i in xrange(x - count, x):
                     self.board[y][i] = 0
-                    self.die((i, y), turn)
+                    self.die((i, y), turn, animations)
                 killed += 1
 
         for x, cell in enumerate(self.board[0]):
@@ -136,23 +136,24 @@
         return points, checked
 
 
-    def kill_groups2(self, turn):
-        """Alternative kill_groups implementation (look for any shape)"""
-        GROUP_SIZE = 5
-        killed = 0
-        checked = [[False for i in row] for row in self.board]
-        for i, row in enumerate(self.board):
-            for j in range(len(row)):
-                if checked[i][j]:
-                    continue
-                points, checked = self.check_neighbours(i, j, checked)
-                if len(points) >= GROUP_SIZE:
-                    for point in points:
-                        killed += 1
-                        y, x = point
-                        self.board[y][x] = 0
-                        self.cells[y][x].die(turn)
-        return killed
+
+    #def kill_groups2(self, turn):
+    #    """Alternative kill_groups implementation (look for any shape)"""
+    #    GROUP_SIZE = 5
+    #    killed = 0
+    #    checked = [[False for i in row] for row in self.board]
+    #    for i, row in enumerate(self.board):
+    #        for j in range(len(row)):
+    #            if checked[i][j]:
+    #                continue
+    #            points, checked = self.check_neighbours(i, j, checked)
+    #            if len(points) >= GROUP_SIZE:
+    #                for point in points:
+    #                    killed += 1
+    #                    y, x = point
+    #                    self.board[y][x] = 0
+    #                    self.cells[y][x].die(turn)
+    #    return killed
 
     def kill_one(self, (x, y)):
         animations = []