#ifndef H_ANT #define H_ANT #include "colony.hpp" #include "food.hpp" #include "main.hpp" #include "pheromone_map.hpp" #include "world_object.hpp" #include #include #include #include #include #include constexpr unsigned int speed = 1; constexpr unsigned int view_angle = 45; // angle degrees to each side constexpr unsigned int view_distance = 25; // more like smell distance typedef enum { NORTH, EAST, SOUTH, WEST } direction; std::tuple direction_to_offset(direction dir); class Ant : public WorldObject { private: direction dir; bool has_food = false; // TODO: Should this be here or just global? PheromoneMap& pheromones; public: // Contains the WorldObjects (other ants?, base, food) // TODO: Replace this with direct refereces to base/food std::vector> umwelt; Ant(PheromoneMap& pheromones); void addToUmwelt(const std::shared_ptr& object); void update() override; void move(); void move_to_base(); void updateAppearance(); void dropPheromone(); // red bool has_pheromones() override { return false; } }; #endif