diff --git a/agent.h b/agent.h index e05b699..4a5d326 100644 --- a/agent.h +++ b/agent.h @@ -20,6 +20,11 @@ public: void on_tick(void); + ~agent() + { + tile->on_agent_leave(*this); + }; + private: /* Just for initial placement. */ void put_at(class tile &tile); diff --git a/main.cc b/main.cc index 83f600a..c0672de 100644 --- a/main.cc +++ b/main.cc @@ -49,8 +49,6 @@ main(int argc, char *argv[]) usleep(1000000); tick_id++; } - - /* TODO: destroy agent cleanly */ } return 0;