Commit graph

26 commits

Author SHA1 Message Date
Petr Baudis
d120fcc938 main(): Allow map dimensions as commandline arguments 2011-11-27 03:49:23 +01:00
Petr Baudis
4fe552a79e Ensure unicate agent IDs 2011-11-27 02:24:04 +01:00
Petr Baudis
de6a4d656f Support for command input
For starters, 'move_dir x y' command is supported.
2011-11-27 02:14:57 +01:00
Petr Baudis
ec3897b29b map::agent_startpos(): Introduce, abstract out from main loop 2011-11-27 00:38:31 +01:00
Petr Baudis
f0d0bef899 agent::on_senses_update(): Split off on_tick() 2011-11-27 00:33:05 +01:00
Petr Baudis
9c746310de Correctly number new agents 2011-11-27 00:29:32 +01:00
Petr Baudis
1a9dcce608 Separate agent on_tick and removal, better world consistency 2011-11-27 00:26:45 +01:00
Petr Baudis
27f4f4a3b0 Main loop: Add comments 2011-11-27 00:25:16 +01:00
Petr Baudis
6f038434f9 Accept new agents at the beginning of tick 2011-11-27 00:24:05 +01:00
Petr Baudis
f33f7c1d61 Support for multiple connected agents 2011-11-27 00:22:29 +01:00
Petr Baudis
eb42ab4764 map::on_tick(): Introduce, call in each tick 2011-11-27 00:03:20 +01:00
Petr Baudis
d7ed0bc6ce Move print_map() to the end of the tick 2011-11-27 00:02:10 +01:00
Petr Baudis
6a3d9b2e4a Destroy agent on disconnect; another agent can connect later 2011-11-26 23:59:31 +01:00
Petr Baudis
a645ba5758 agent::conn: Change to pointer, delete in ~agent() 2011-11-26 23:52:31 +01:00
Petr Baudis
1d15adac48 Main loop: Switch to infinite ticking paradigm; agents connect on the fly, cannot reconnect yet 2011-11-26 23:50:07 +01:00
Petr Baudis
2603aacf1f Don't die on SIGPIPE 2011-11-26 23:37:25 +01:00
Petr Baudis
07dbb9c4f9 ~agent(): Introduce proper destructor 2011-11-26 23:36:10 +01:00
Petr Baudis
1ed67c81b6 Maintain and broadcast current tick id 2011-11-26 23:31:28 +01:00
Petr Baudis
3d485518b0 agent::on_tick(): Introduce 2011-11-26 23:26:01 +01:00
Petr Baudis
6b3a51139a Support for (read-only) TCP connection agent communication 2011-11-26 23:24:06 +01:00
Petr Baudis
a72882a743 Fix map addressing 2011-11-26 22:00:16 +01:00
Petr Baudis
125d0a416e Spawn agent at random position 2011-11-26 21:47:31 +01:00
Petr Baudis
b305a41cfc agent::move_dir(): Implement 2011-11-26 20:40:22 +01:00
Petr Baudis
56726a6c05 Get rid of class position 2011-11-26 20:40:05 +01:00
Petr Baudis
32dc354e60 Create an agent 2011-11-26 19:41:03 +01:00
Petr Baudis
ce6f46ef1c brmlife: Initial version
Can draw 10x10 field of dots.
2011-11-26 19:21:27 +01:00