diff --git a/agent.cc b/agent.cc index 0688e00..4f016e1 100644 --- a/agent.cc +++ b/agent.cc @@ -42,6 +42,7 @@ agent::on_action_takes(void) void agent::on_tick(void) { + energy += world::sun_energy; } void diff --git a/world.h b/world.h index 41d91f4..dbfad88 100644 --- a/world.h +++ b/world.h @@ -4,6 +4,7 @@ struct world { const static int newborn_energy = 500; const static int move_cost = 10; + const static int sun_energy = 1; }; #endif