15 #ifndef CORE_BEHAVIOR_GROWTH_DIVISION_H_
16 #define CORE_BEHAVIOR_GROWTH_DIVISION_H_
39 Base::Initialize(event);
41 auto* other =
event.existing_behavior;
47 "event.existing_behavior was not of type GrowthDivision");
55 if (
auto* cell =
dynamic_cast<Cell*
>(agent)) {
62 Log::Fatal(
"GrowthDivision::Run",
"Agent is not a Cell");
Contains code required by all agents.
void AlwaysCopyToNew()
Always copy this behavior to new agents.
void Initialize(const NewAgentEvent &event) override
BDM_BEHAVIOR_HEADER(GrowthDivision, Behavior, 1)
virtual ~GrowthDivision()=default
GrowthDivision(real_t threshold, real_t growth_rate)
void Run(Agent *agent) override
static void Fatal(const std::string &location, const Args &... parts)
Prints fatal error message.