Support for command input

For starters, 'move_dir x y' command is supported.
This commit is contained in:
Petr Baudis 2011-11-27 02:14:57 +01:00
parent 92940b6054
commit de6a4d656f
5 changed files with 73 additions and 3 deletions

View file

@ -8,6 +8,8 @@
#include "map.h"
class agent;
class connection {
public:
int fd;
@ -25,11 +27,12 @@ public:
}
void senses(int tick_id, char around[4]);
void actions(class agent *);
void cancel(void);
private:
std::string out_buf;
std::string out_buf, in_buf;
pthread_mutex_t buf_lock;
pthread_cond_t cancel_cond;