Tile.hpp 359 B

12345678910111213141516171819202122
  1. #ifndef PARTICLE_TILE
  2. #define PARTICLE_TILE
  3. #include "definitions.hpp"
  4. struct Tile {
  5. numeric_t pheromone = 0;
  6. numeric_t variation = 0;
  7. size_t population = 0;
  8. void update(){
  9. pheromone += variation;
  10. if(pheromone < 0)
  11. pheromone = 0;
  12. variation = 0;
  13. population = 0;
  14. }
  15. };
  16. #endif // PARTICLE_TILE