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
2
main.cc
2
main.cc
|
@ -52,7 +52,7 @@ main(int argc, char *argv[])
|
|||
if (cfd >= 0) {
|
||||
class connection *conn = new class connection(cfd);
|
||||
class tile &agentpos = map.tile_at(random() % map.w, random() % map.h);
|
||||
agent = new class agent(0, agentpos, *conn);
|
||||
agent = new class agent(0, agentpos, conn);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue