mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-02 18:03:37 +02:00
agent::conn: Change to pointer, delete in ~agent()
This commit is contained in:
parent
1d15adac48
commit
a645ba5758
3 changed files with 11 additions and 8 deletions
8
agent.cc
8
agent.cc
|
@ -37,5 +37,11 @@ agent::on_tick(void)
|
|||
tile->tile_in_dir(0, 1).symbol(),
|
||||
tile->tile_in_dir(-1, 0).symbol(),
|
||||
};
|
||||
conn.senses(tick_id, around);
|
||||
conn->senses(tick_id, around);
|
||||
}
|
||||
|
||||
agent::~agent()
|
||||
{
|
||||
tile->on_agent_leave(*this);
|
||||
delete conn;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue