Commit graph

43 commits

Author SHA1 Message Date
Petr Baudis
692f968e64 ./brmlife -t: Missing break 2011-12-03 18:57:53 +01:00
Petr Baudis
cd79c56bfb ./brmlife -t TICKMS: Implement customizable tick length 2011-12-03 18:54:05 +01:00
Petr Baudis
643e33c342 ./brmlife -p PORT: Implement commandline override 2011-12-03 15:46:17 +01:00
Petr Baudis
f9f5becd16 main(): Use getopts for parameter parsing 2011-12-03 15:43:08 +01:00
Petr Baudis
a8f029c81a Revert spurious port number change 2011-12-03 15:24:29 +01:00
Petr Baudis
09114fa6d9 Main loop: Show # of agents and clients in the tick line 2011-12-03 14:36:04 +01:00
Petr Baudis
1b8a830191 main(): Clear screen between ticks 2011-12-03 14:30:31 +01:00
Petr Baudis
ded047fb40 Now, agents can disappear after action_takes too 2011-11-29 23:10:01 +01:00
Petr Baudis
9c4adb5a3a Preserve corpses of disconnected agents 2011-11-29 22:58:18 +01:00
Petr Baudis
2a8da64385 Speed up simulation - 1s -> 200ms per tick 2011-11-29 22:27:50 +01:00
Petr Baudis
6c20afd21c drop_agents(): Do not drop agents that are dead, but still with a connection 2011-11-29 20:02:38 +01:00
sachy
58d934343c Added server pre-gui interface 2011-11-28 21:08:48 +01:00
Petr Baudis
0e1243f86f Evolve herbs dynamically based on energy 2011-11-27 07:33:48 +01:00
Petr Baudis
4d697adc83 Spawn some herbs at startup 2011-11-27 05:26:44 +01:00
Petr Baudis
9cf99e0bcd Connection: Add negotiation phase 2011-11-27 05:06:46 +01:00
Petr Baudis
812e0da79b agent::spawn(): Introduce 2011-11-27 04:30:18 +01:00
Petr Baudis
7714906baa agent::spawn_at(): Disassociate from constructor, allow tile == NULL 2011-11-27 04:28:16 +01:00
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