ColonyConfiguration.py 537B

12345678910111213141516171819
  1. from synergine.synergy.collection.Configuration import Configuration
  2. from socialintengine.synergy.object.ant.Ant import Ant
  3. from synergine.metas import metas
  4. from socialintengine.cst import ALIVE
  5. from synergine.synergy.Simulation import Simulation
  6. class ColonyConfiguration(Configuration):
  7. def get_start_objects(self):
  8. ants = []
  9. for i in range(20):
  10. ant = Ant()
  11. ant.add_trace((0, 20, 20))
  12. metas.list.add(Simulation.STATE, ant.get_id(), ALIVE)
  13. ants.append(ant)
  14. return ants