mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-02 18:03:37 +02:00
Support for command input
For starters, 'move_dir x y' command is supported.
This commit is contained in:
parent
92940b6054
commit
de6a4d656f
5 changed files with 73 additions and 3 deletions
5
main.cc
5
main.cc
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue