Remove debugging print. Standardise validation behaviour
authorNeil <neil@dip.sun.ac.za>
Thu, 18 Apr 2013 12:06:46 +0000 (14:06 +0200)
committerNeil <neil@dip.sun.ac.za>
Thu, 18 Apr 2013 12:06:46 +0000 (14:06 +0200)
erdslangetjie/level.py

index fd039f9e1b59308a12e63de10c1e3fbc61da5224..b5dbe1343861f05958fd89d0c494d8e4f46d613c 100644 (file)
@@ -179,7 +179,6 @@ class Level(object):
             self._data[pos[1]][pos[0]]
         except IndexError:
             return False
             self._data[pos[1]][pos[0]]
         except IndexError:
             return False
-        print pos, self._data[pos[1]][pos[0]]
         return True
 
     def blocked(self, pos):
         return True
 
     def blocked(self, pos):
@@ -245,7 +244,7 @@ class LevelList(object):
                 self.levels.append(Level(level_file))
                 level_file.close()
             else:
                 self.levels.append(Level(level_file))
                 level_file.close()
             else:
-                print 'Level list includes non-existant level %s' % line
+                raise RuntimeError('Level list includes non-existant level %s' % line)
         level_list.close()
         self._cur_level = 0
 
         level_list.close()
         self._cur_level = 0