Add helper method
authorNeil <neil@dip.sun.ac.za>
Tue, 16 Apr 2013 14:50:40 +0000 (16:50 +0200)
committerNeil <neil@dip.sun.ac.za>
Tue, 16 Apr 2013 14:50:40 +0000 (16:50 +0200)
erdslangetjie/level.py

index 283588c087f53a69d05e232c0e393e6822f54e62..450ce8c6152b4e2f9932b3eac0c3d8667b8ce632 100644 (file)
@@ -42,6 +42,9 @@ class Level(object):
     def get_tiles(self):
         return self.tiles
 
+    def get_size(self):
+        return len(self.tiles[0]), len(self.tiles)
+
     def at_exit(self, pos):
         return pos in self.exit_pos