RedColonyConfiguration.py 876B

123456789101112131415161718192021222324252627
  1. from intelligine.synergy.ColonyConfiguration import ColonyConfiguration
  2. from intelligine.sandbox.colored.RedAnt import RedAnt
  3. from intelligine.synergy.object.ant.Egg import Egg
  4. from synergine.metas import metas
  5. from intelligine.cst import COLONY
  6. class RedColonyConfiguration(ColonyConfiguration):
  7. _start_position = (0, 20, 70)
  8. _ant_class = RedAnt
  9. def get_start_objects(self, collection):
  10. objects = super().get_start_objects(collection)
  11. for x in range(50):
  12. for y in range(1, 50):
  13. if x % 3 == 0 and y % 3 == 0:
  14. egg = Egg()
  15. egg.set_position((0, 1+x, 50+y))
  16. # TODO: Ce COLONY doit devenir un truc automatise au niveau de la collection (qd get_object)
  17. metas.value.set(COLONY, egg.get_id(), collection.get_id())
  18. objects.append(egg)
  19. return objects