diff --git a/connection.cc b/connection.cc index 0a467c7..206a1ef 100644 --- a/connection.cc +++ b/connection.cc @@ -1,7 +1,8 @@ #include -#include +#include #include #include +#include #include "agent.h" #include "connection.h" diff --git a/connection.h b/connection.h index 3067188..1d1941e 100644 --- a/connection.h +++ b/connection.h @@ -1,7 +1,7 @@ #ifndef BRMLIFE__CONNECTION_H #define BRMLIFE__CONNECTION_H -#include +#include #include "map.h" @@ -11,6 +11,11 @@ public: connection(int fd_) : fd(fd_) {} + ~connection() + { + close(fd); + } + void senses(int tick_id, char around[4]); };