Commit graph

81 commits

Author SHA1 Message Date
sachy
58d934343c Added server pre-gui interface 2011-11-28 21:08:48 +01:00
Petr Baudis
bde2785d76 README: Document x 2011-11-27 19:06:00 +01:00
Petr Baudis
ada1d0a6c9 Fix agent initialization 2011-11-27 17:05:16 +01:00
Petr Baudis
de392f4c7a Allow moving onto a herb, eating it 2011-11-27 07:53:59 +01:00
Petr Baudis
be64c92077 tile::str(): Report herb 2011-11-27 07:41:23 +01:00
Petr Baudis
529c401457 connection::actions(): Do not permit multiple actions of the same kind per tick 2011-11-27 07:37:30 +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
b80ccfdffd Attack, defense rates 2011-11-27 05:18:52 +01:00
Petr Baudis
ceb16277fb world::move_idle_cost: Introduce, based on attr.move 2011-11-27 05:09:41 +01:00
Petr Baudis
2907cb6791 Connection: Add 'move' attribute to the negotiation phase 2011-11-27 05:07:01 +01:00
Petr Baudis
9cf99e0bcd Connection: Add negotiation phase 2011-11-27 05:06:46 +01:00
Petr Baudis
85e143fd11 connection::bump(): Fix double locking 2011-11-27 05:05:57 +01:00
Petr Baudis
a36deeb1db Connection: Abstract out buf_incomplete() macro 2011-11-27 05:05:43 +01:00
Petr Baudis
a151a2985d agent::on_tick(): Do nothing when not placed 2011-11-27 04:42:52 +01:00
Petr Baudis
a2a52f5884 World: Multiply all constants by ten for higher granularity 2011-11-27 04:41:41 +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
3e5366a5c4 README: Document attack_dir 2011-11-27 04:17:29 +01:00
Petr Baudis
ed2c1ee11b move_cost: Scale down from -10 to -5 2011-11-27 04:17:04 +01:00
Petr Baudis
9bf8281b91 dead_body_energy: Scale down from 500 to 200 2011-11-27 04:16:32 +01:00
Petr Baudis
14015e3bfc tile::symbol(): Return 'a' on dead agents 2011-11-27 04:16:07 +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
d120fcc938 main(): Allow map dimensions as commandline arguments 2011-11-27 03:49:23 +01:00
Petr Baudis
5efaafe983 Sense around -> visual 2011-11-27 03:44:14 +01:00
Petr Baudis
f0a603352f Sense around: Extended format describing agents explicitly 2011-11-27 03:43:45 +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
9dcb3c543a Connection: Use CRLF for output too 2011-11-27 03:16:47 +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
77e555706b Send BUMP if move failed 2011-11-27 02:59:28 +01:00
Petr Baudis
de7a604e52 Dead bodies have (slowly decaying) energy 2011-11-27 02:54:58 +01:00
Petr Baudis
80712598e0 README: Document DEAD, energy 2011-11-27 02:53:22 +01:00
Petr Baudis
64ea015a06 Support for agent death 2011-11-27 02:48:28 +01:00
Petr Baudis
f6221436a4 connection::thread_loop(): Do not write() if we have nothing to write 2011-11-27 02:40:57 +01:00
Petr Baudis
296f4148d3 Introduce sun energy (on-tick gain) 2011-11-27 02:34:28 +01:00
Petr Baudis
158ab85715 connection::thread_loop(): Break on zero reads 2011-11-27 02:33:24 +01:00
Petr Baudis
93882f79b9 Track agent energy
Base energy, move energy
2011-11-27 02:32:59 +01:00
Petr Baudis
4fe552a79e Ensure unicate agent IDs 2011-11-27 02:24:04 +01:00
Petr Baudis
d44c5f5b10 move_dir: Restrict to {-1,0,1} 2011-11-27 02:22:14 +01:00
Petr Baudis
5ed183c554 Add basic README + protocol description 2011-11-27 02:20:15 +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
ec3897b29b map::agent_startpos(): Introduce, abstract out from main loop 2011-11-27 00:38:31 +01:00
Petr Baudis
ea4f18b642 map::on_tick(): Move to map.cc 2011-11-27 00:36:07 +01:00
Petr Baudis
ba9d51fda0 Tidyup. 2011-11-27 00:35:11 +01:00