mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-03 18:33:39 +02:00
Introduce sun energy (on-tick gain)
This commit is contained in:
parent
158ab85715
commit
296f4148d3
2 changed files with 2 additions and 0 deletions
1
agent.cc
1
agent.cc
|
@ -42,6 +42,7 @@ agent::on_action_takes(void)
|
||||||
void
|
void
|
||||||
agent::on_tick(void)
|
agent::on_tick(void)
|
||||||
{
|
{
|
||||||
|
energy += world::sun_energy;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
1
world.h
1
world.h
|
@ -4,6 +4,7 @@
|
||||||
struct world {
|
struct world {
|
||||||
const static int newborn_energy = 500;
|
const static int newborn_energy = 500;
|
||||||
const static int move_cost = 10;
|
const static int move_cost = 10;
|
||||||
|
const static int sun_energy = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue