Moved stringify cruft into a render module.
[pseudoku.git] / pseudoku / grid / __init__.py
index 2f77aaf..9370dd6 100644 (file)
@@ -117,14 +117,6 @@ class Cell(object):
             self.normalize()
 
 
-    def __str__(self):
-        """Stringification for pretty-printing."""
-        if self.value != None:
-            return symbols[self.value]
-
-        return '.'
-
-
 class Grid(object):
     """Represents a Sudoku grid."""
 
@@ -302,31 +294,3 @@ class Grid(object):
         """Normalizes every cell in the grid."""
         for cell in self._cells:
             cell.normalize()
-
-
-    def __str__(self):
-        """Pretty-printing."""
-        divider = '+'
-        for box in xrange(self._box_height):
-            for col in xrange(self._box_width):
-                divider += '-'
-            divider += '+'
-
-        res = ''
-        for row in xrange(self._size):
-            if row % self._box_height == 0:
-                res += divider
-                res += "\n"
-
-            for col in xrange(self._size):
-                if col % self._box_width == 0:
-                    res += '|'
-                res += str(self.cell(row, col))
-
-            res += '|'
-            res += "\n"
-
-        res += divider
-        res += "\n"
-
-        return res