Beispiel #1
0
    def update(self):
        cid: int = self.cell_id

        if self.is_new:
            self.create_candidates()
        elif self.action == 1:
            cells[cid].agent_ = DeviceAllocator.new(Candidate, cid)
            DeviceAllocator.destroy(self)
Beispiel #2
0
 def update(self):
     cid: int = self.cell_id
     if self.action == 2:
         cells[cid].agent_ = DeviceAllocator.new(Alive, cid)
         cells[cid].agent_.is_alive = True
         DeviceAllocator.destroy(self)