コード例 #1
0
    def set_world(self, world_size, position, background):
        MapTools.__init__(self, world_size, world_size)
        self.observed = set()
        self.background = background + '_full'

        self.world_size = world_size
        self.map = defaultdict(lambda: defaultdict(lambda: 'fog'))
        self.tiles = []

        self.surface.set_camera_position(position)
        self.main_tile = background
        self.accepted = True
        print 'New world with background', self.main_tile, background
コード例 #2
0
 def set_world(self, world_size, position, background):
     MapTools.__init__(self, world_size, world_size)
     self.observed = set()
     self.background = background+'_full'
     
     self.world_size = world_size
     self.map = defaultdict(lambda: defaultdict(lambda: 'fog'))
     self.tiles = []
     
     self.surface.set_camera_position(position)
     self.main_tile = background
     self.accepted = True
     print 'New world with background', self.main_tile, background
コード例 #3
0
    def __init__(self, window, surface):
        MapTools.__init__(self, 0, 0)
        Drawable.__init__(self)
        self.window = window
        self.surface = surface
        self.accepted = False

        self.observed = set()
        self.tiles = []
        self.map = defaultdict(lambda: defaultdict(lambda: 'fog'))
        self.world_size = 0
        self.background = 'fog'
        self.main_tile = 'fog'
コード例 #4
0
    def __init__(self, window, surface):
        MapTools.__init__(self, 0, 0)
        Drawable.__init__(self)
        self.window = window
        self.surface = surface
        self.accepted = False

        self.observed = set()
        self.tiles = []
        self.map = defaultdict(lambda: defaultdict(lambda: 'fog'))
        self.world_size = 0
        self.background = 'fog'
        self.main_tile = 'fog'