Did I find the right examples for you? yes no

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

        def make_2darray(elem, geometry):
    return [[elem for i in range(geometry[1])]
            for j in range(geometry[0])]
        


src/i/r/irobot2-HEAD/irobot2/game_map.py   irobot2(Download)
 
from   .sprite import SpObject, SpDummy
from   .util   import vec2d, make_2darray
 
class GameMap(object):
        self._tile_size = info['info']['tile_size']
        self._geometry = info['info']['geometry']
        self._grid = make_2darray(None, self._geometry)
        self._bitgrid = make_2darray(0, self._geometry)