예제 #1
0
    def __init__(self, world, default=0.0, default_power=None, data=None, power=None):

        if default_power is None:
            default_power = default

        self.world = world

        self.next_data = []
        for y in range(0, self.h):
            self.next_data.append([default] * self.w)

        self.data = copy2d(self.next_data) if data is None else data

        self.base_power = []
        for y in range(0, self.h):
            self.base_power.append([default_power] * self.w)

        self.power = copy2d(self.base_power) if power is None else power
예제 #2
0
    def __init__(self,
                 world,
                 default=0.0,
                 default_power=None,
                 data=None,
                 power=None):

        if default_power is None:
            default_power = default

        self.world = world

        self.next_data = []
        for y in range(0, self.h):
            self.next_data.append([default] * self.w)

        self.data = copy2d(self.next_data) if data is None else data

        self.base_power = []
        for y in range(0, self.h):
            self.base_power.append([default_power] * self.w)

        self.power = copy2d(self.base_power) if power is None else power
예제 #3
0
 def apply(self):
     self.data = copy2d(self.next_data)
예제 #4
0
 def reset_powers(self):
     self.power = copy2d(self.base_power)
예제 #5
0
 def apply(self):
     self.data = copy2d(self.next_data)
예제 #6
0
 def reset_powers(self):
     self.power = copy2d(self.base_power)