mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-02 09:53:38 +02:00
agent::spawn(): Introduce
This commit is contained in:
parent
7714906baa
commit
812e0da79b
3 changed files with 12 additions and 4 deletions
6
agent.h
6
agent.h
|
@ -11,17 +11,19 @@ public:
|
|||
int id;
|
||||
class connection *conn;
|
||||
|
||||
class map ↦
|
||||
class tile *tile;
|
||||
|
||||
int energy;
|
||||
bool dead;
|
||||
|
||||
agent(int id_, class connection *conn_)
|
||||
: id (id_), conn (conn_)
|
||||
agent(int id_, class connection *conn_, class map &map_)
|
||||
: id (id_), conn (conn_), map (map_)
|
||||
{
|
||||
energy = world::newborn_energy;
|
||||
dead = false;
|
||||
};
|
||||
void spawn(void);
|
||||
void spawn_at(class tile &tile);
|
||||
|
||||
bool move_dir(int dir_x, int dir_y);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue