| Total Complexity | 3 |
| Total Lines | 20 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | from synergine.synergy.collection.Configuration import Configuration |
||
| 6 | class ColonyConfiguration(Configuration): |
||
| 7 | |||
| 8 | _start_position = (0, 20, 20) |
||
| 9 | _ant_class = Ant |
||
| 10 | _ant_count = 50 |
||
| 11 | |||
| 12 | @classmethod |
||
| 13 | def get_start_position(cls): |
||
| 14 | return cls._start_position |
||
| 15 | |||
| 16 | def get_start_objects(self, collection, context): |
||
| 17 | context.metas.value.set(POSITION, collection.get_id(), self._start_position) |
||
| 18 | |||
| 19 | ants = [] |
||
| 20 | for i in range(self._ant_count): |
||
| 21 | ant = self._ant_class(collection, context) |
||
| 22 | ant.set_position(self._start_position) |
||
| 23 | ants.append(ant) |
||
| 24 | |||
| 25 | return ants |