Commit graph

  • da3a988116 Introduce world::dead_body_energy_carryover Petr Baudis 2011-11-27 04:12:51 +01:00
  • 0c29808836 Action attack_dir(): Implement, trivially random now Petr Baudis 2011-11-27 04:10:53 +01:00
  • 0398856635 agent::chenergy(): Implement Petr Baudis 2011-11-27 04:01:58 +01:00
  • d120fcc938 main(): Allow map dimensions as commandline arguments Petr Baudis 2011-11-27 03:49:23 +01:00
  • 5efaafe983 Sense around -> visual Petr Baudis 2011-11-27 03:44:14 +01:00
  • f0a603352f Sense around: Extended format describing agents explicitly Petr Baudis 2011-11-27 03:43:45 +01:00
  • e22c57c97f connnection::actions(): Take agent& Petr Baudis 2011-11-27 03:25:16 +01:00
  • 415475cd26 connnection::senses(): Sanitize interface, take just agent& Petr Baudis 2011-11-27 03:24:40 +01:00
  • 9dcb3c543a Connection: Use CRLF for output too Petr Baudis 2011-11-27 03:16:47 +01:00
  • b969e91bd1 around: Show 8-neighborhood Petr Baudis 2011-11-27 03:16:11 +01:00
  • 4f13d0dd6f agent::move_dir(): If moving at dead agent, remove it from map and acquire its energy Petr Baudis 2011-11-27 03:07:42 +01:00
  • e27a9fe2aa agent::move_dir(): Disallow movement of dead agent Petr Baudis 2011-11-27 03:00:38 +01:00
  • 77e555706b Send BUMP if move failed Petr Baudis 2011-11-27 02:59:28 +01:00
  • de7a604e52 Dead bodies have (slowly decaying) energy Petr Baudis 2011-11-27 02:54:52 +01:00
  • 80712598e0 README: Document DEAD, energy Petr Baudis 2011-11-27 02:53:22 +01:00
  • 64ea015a06 Support for agent death Petr Baudis 2011-11-27 02:48:28 +01:00
  • f6221436a4 connection::thread_loop(): Do not write() if we have nothing to write Petr Baudis 2011-11-27 02:40:57 +01:00
  • 296f4148d3 Introduce sun energy (on-tick gain) Petr Baudis 2011-11-27 02:34:28 +01:00
  • 158ab85715 connection::thread_loop(): Break on zero reads Petr Baudis 2011-11-27 02:33:24 +01:00
  • 93882f79b9 Track agent energy Petr Baudis 2011-11-27 02:32:59 +01:00
  • 4fe552a79e Ensure unicate agent IDs Petr Baudis 2011-11-27 02:24:04 +01:00
  • d44c5f5b10 move_dir: Restrict to {-1,0,1} Petr Baudis 2011-11-27 02:22:14 +01:00
  • 5ed183c554 Add basic README + protocol description Petr Baudis 2011-11-27 02:20:15 +01:00
  • de6a4d656f Support for command input Petr Baudis 2011-11-27 02:14:57 +01:00
  • 92940b6054 Connection communication in separate thread Petr Baudis 2011-11-27 01:24:52 +01:00
  • ec3897b29b map::agent_startpos(): Introduce, abstract out from main loop Petr Baudis 2011-11-27 00:38:31 +01:00
  • ea4f18b642 map::on_tick(): Move to map.cc Petr Baudis 2011-11-27 00:36:07 +01:00
  • ba9d51fda0 Tidyup. Petr Baudis 2011-11-27 00:35:11 +01:00
  • f0d0bef899 agent::on_senses_update(): Split off on_tick() Petr Baudis 2011-11-27 00:33:05 +01:00
  • 9c746310de Correctly number new agents Petr Baudis 2011-11-27 00:29:32 +01:00
  • 1a9dcce608 Separate agent on_tick and removal, better world consistency Petr Baudis 2011-11-27 00:26:45 +01:00
  • 27f4f4a3b0 Main loop: Add comments Petr Baudis 2011-11-27 00:25:16 +01:00
  • 6f038434f9 Accept new agents at the beginning of tick Petr Baudis 2011-11-27 00:24:05 +01:00
  • f33f7c1d61 Support for multiple connected agents Petr Baudis 2011-11-27 00:22:29 +01:00
  • 50fb0bd004 CFLAGS -= -O3, difficult debugging Petr Baudis 2011-11-27 00:16:20 +01:00
  • 54603edcb9 map::map: Use in-place constructor Petr Baudis 2011-11-27 00:04:45 +01:00
  • eb42ab4764 map::on_tick(): Introduce, call in each tick Petr Baudis 2011-11-27 00:03:20 +01:00
  • d7ed0bc6ce Move print_map() to the end of the tick Petr Baudis 2011-11-27 00:02:10 +01:00
  • 6a3d9b2e4a Destroy agent on disconnect; another agent can connect later Petr Baudis 2011-11-26 23:59:31 +01:00
  • cd347a316d agent::conn: Do not assume being non-NULL Petr Baudis 2011-11-26 23:53:50 +01:00
  • a645ba5758 agent::conn: Change to pointer, delete in ~agent() Petr Baudis 2011-11-26 23:52:31 +01:00
  • 1d15adac48 Main loop: Switch to infinite ticking paradigm; agents connect on the fly, cannot reconnect yet Petr Baudis 2011-11-26 23:50:07 +01:00
  • 978a080656 ~connection(): Close file descriptor Petr Baudis 2011-11-26 23:43:52 +01:00
  • 2603aacf1f Don't die on SIGPIPE Petr Baudis 2011-11-26 23:37:25 +01:00
  • 07dbb9c4f9 ~agent(): Introduce proper destructor Petr Baudis 2011-11-26 23:36:10 +01:00
  • 1ed67c81b6 Maintain and broadcast current tick id Petr Baudis 2011-11-26 23:31:28 +01:00
  • 3d485518b0 agent::on_tick(): Introduce Petr Baudis 2011-11-26 23:26:01 +01:00
  • 6b3a51139a Support for (read-only) TCP connection agent communication Petr Baudis 2011-11-26 23:24:06 +01:00
  • a72882a743 Fix map addressing Petr Baudis 2011-11-26 22:00:16 +01:00
  • 2c83064fa9 Makefile: $(OBJS) Petr Baudis 2011-11-26 21:47:40 +01:00
  • 125d0a416e Spawn agent at random position Petr Baudis 2011-11-26 21:47:31 +01:00
  • b305a41cfc agent::move_dir(): Implement Petr Baudis 2011-11-26 20:40:22 +01:00
  • 56726a6c05 Get rid of class position Petr Baudis 2011-11-26 20:40:05 +01:00
  • f622f79283 gitignore Petr Baudis 2011-11-26 19:41:27 +01:00
  • 32dc354e60 Create an agent Petr Baudis 2011-11-26 19:41:03 +01:00
  • a131964cc0 position() constructor: Take map ref, not ptr Petr Baudis 2011-11-26 19:40:39 +01:00
  • 1eaf680111 tile::on_agent_enter(): Check for collisions Petr Baudis 2011-11-26 19:40:05 +01:00
  • 8e78efd7d8 tile::symbol() -> ::type_symbol(), ::symbol() accounts for agent id Petr Baudis 2011-11-26 19:26:32 +01:00
  • ce6f46ef1c brmlife: Initial version Petr Baudis 2011-11-26 19:20:51 +01:00