Beispiel #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
Beispiel #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
Beispiel #3
0
 def apply(self):
     self.data = copy2d(self.next_data)
Beispiel #4
0
 def reset_powers(self):
     self.power = copy2d(self.base_power)
Beispiel #5
0
 def apply(self):
     self.data = copy2d(self.next_data)
Beispiel #6
0
 def reset_powers(self):
     self.power = copy2d(self.base_power)