예제 #1
0
 def __init__(self, grid, sprite, life=100, randomizer=None):
     AbstractAnt.__init__(self, grid, sprite, life=life, randomizer=randomizer)
     self.pheromones = set()
     self.state = None
     self._food = None
예제 #2
0
 def __init__(self, grid, sprite, antPromotion, life=100, randomizer=None):
     AbstractAnt.__init__(self, grid, sprite, life=life, randomizer=randomizer)
     self.pheromones = []
     self.state = None
     self.target = None
     self._antPromotion = antPromotion
예제 #3
0
 def __init__(self, grid, sprite, life=100):
     AbstractAnt.__init__(self, grid, sprite, life=life)
     self.pheromones = []
예제 #4
0
 def __init__(self, grid, sprite, life=100, nextPosition=None, nextAnt=None):
     AbstractAnt.__init__(self, grid, sprite, life=life)
     self.pheromones = [Pheromone(QUEEN_PHEROMONE_KIND, 64)]
     self._next = None
     self._nextPositionFactory = nextPosition or randomNextPosition
     self._nextAntFactory = nextAnt