exceptions.py 624B

1234567891011121314151617181920212223242526272829303132333435
  1. class MovementException(Exception):
  2. pass
  3. class SamePosition(MovementException):
  4. pass
  5. class PheromoneException(Exception):
  6. pass
  7. class NoPheromone(PheromoneException):
  8. pass
  9. class NoPheromoneMove(PheromoneException, MovementException):
  10. pass
  11. class BestPheromoneHere(PheromoneException):
  12. def __init__(self, best_distance, *args, **kwargs):
  13. super().__init__(*args, **kwargs)
  14. self._best_distance = best_distance
  15. def get_best_distance(self):
  16. return self._best_distance
  17. class BrainException(Exception):
  18. pass
  19. class BrainPartAlreadyExist(BrainException):
  20. pass