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

@ -69,6 +69,11 @@ next_agent:
agents.push_back(new class agent(agents.size(), map.agent_startpos(), conn));
}
/* Collect and take actions. */
for (std::list<class agent *>::iterator agent = agents.begin(); agent != agents.end(); agent++)
(*agent)->on_action_takes();
/* Run on_tick everywhere. */
map.on_tick();