Ejemplo n.º 1
0
Archivo: Maze.py Proyecto: arc2nd/maze
 def gen_tiles(self, tile_dict):
     all_tiles = []
     for t in tile_dict:
         local = tile_dict[t]
         this_tile = Tile.MazeTile(name=t,
                                   image_path=local['image'],
                                   t_type=local['type'])
         if local['type'] == 'static':
             this_tile.square = [local['square'][0], local['square'][1]]
         all_tiles.append(this_tile)
     for i in range(9):  # actually 9, for the spare
         all_tiles.append(
             Tile.MazeTile(name='blank_ninety_{}'.format(i),
                           image_path='images/blank_ninety.png'))
     for i in range(13):
         all_tiles.append(
             Tile.MazeTile(name='blank_straight_{}'.format(i),
                           image_path='images/blank_straight.png'))
     return all_tiles