Commit graph

23 commits

Author SHA1 Message Date
Petr Baudis
7714906baa agent::spawn_at(): Disassociate from constructor, allow tile == NULL 2011-11-27 04:28:16 +01:00
Petr Baudis
da3a988116 Introduce world::dead_body_energy_carryover 2011-11-27 04:12:51 +01:00
Petr Baudis
0c29808836 Action attack_dir(): Implement, trivially random now 2011-11-27 04:10:53 +01:00
Petr Baudis
0398856635 agent::chenergy(): Implement 2011-11-27 04:02:25 +01:00
Petr Baudis
e22c57c97f connnection::actions(): Take agent& 2011-11-27 03:25:16 +01:00
Petr Baudis
415475cd26 connnection::senses(): Sanitize interface, take just agent& 2011-11-27 03:24:40 +01:00
Petr Baudis
b969e91bd1 around: Show 8-neighborhood 2011-11-27 03:16:11 +01:00
Petr Baudis
4f13d0dd6f agent::move_dir(): If moving at dead agent, remove it from map and acquire its energy 2011-11-27 03:07:42 +01:00
Petr Baudis
e27a9fe2aa agent::move_dir(): Disallow movement of dead agent 2011-11-27 03:00:38 +01:00
Petr Baudis
de7a604e52 Dead bodies have (slowly decaying) energy 2011-11-27 02:54:58 +01:00
Petr Baudis
64ea015a06 Support for agent death 2011-11-27 02:48:28 +01:00
Petr Baudis
296f4148d3 Introduce sun energy (on-tick gain) 2011-11-27 02:34:28 +01:00
Petr Baudis
93882f79b9 Track agent energy
Base energy, move energy
2011-11-27 02:32:59 +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
92940b6054 Connection communication in separate thread 2011-11-27 01:24:52 +01:00
Petr Baudis
f0d0bef899 agent::on_senses_update(): Split off on_tick() 2011-11-27 00:33:05 +01:00
Petr Baudis
cd347a316d agent::conn: Do not assume being non-NULL
Disconnected agents will remain in the world in the future.
2011-11-26 23:54:05 +01:00
Petr Baudis
a645ba5758 agent::conn: Change to pointer, delete in ~agent() 2011-11-26 23:52:31 +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
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