Strip newlines off map when loading
authorNeil <neil@dip.sun.ac.za>
Mon, 15 Apr 2013 12:39:26 +0000 (14:39 +0200)
committerNeil <neil@dip.sun.ac.za>
Mon, 15 Apr 2013 12:39:26 +0000 (14:39 +0200)
erdslangetjie/level.py

index 3214cf665fb7ec3f7e718015de74cbf887297f96..790557179a7ba5fb6d11361887396fbad8b4896f 100644 (file)
@@ -15,7 +15,7 @@ class Level(object):
         """Load the level"""
         self.data = []
         for line in levelfile.readlines():
-            self.data.append(list(line))
+            self.data.append(list(line.strip('\n')))
 
     def load_tiles(self):
         """Load the list of tiles for the level"""