3 from data import load_image
11 def load(self, levelfile):
14 for line in levelfile.readlines():
15 self.data.append(list(line))
18 """Return a list of tiles for the level"""
20 for j, line in enumerate(self.data):
22 for i, c in enumerate(line):
24 tile_line.append(load_image('tiles/floor.bmp'))
26 tile_line.append(load_image('tiles/wall.bmp'))
27 elif c == 'E' or c == 'X':
28 tile_line.append(load_image('tiles/door.bmp'))
29 tiles.append(tile_line)