コード例 #1
0
    def __init__(self, config):
        observer.Observable.__init__(self)
        Configurable.__init__(self,
                              config=config,
                              config_fields=[
                                  'space_width', 'space_height',
                                  'nutrient_regen', 'nutrient_energy',
                                  'nutrient_density', 'init_indiv_density',
                                  'init_indiv_count', 'neighbor_access',
                                  'incubator', 'terminated'
                              ])

        self.space = Space((self.space_width, self.space_height))
        self.object_counter = defaultdict(int)
        self.step_number = 0  # step counter ; just an information