Commit graph

20 commits

Author SHA1 Message Date
Petr Baudis
a36deeb1db Connection: Abstract out buf_incomplete() macro 2011-11-27 05:05:43 +01:00
Petr Baudis
0c29808836 Action attack_dir(): Implement, trivially random now 2011-11-27 04:10:53 +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
77e555706b Send BUMP if move failed 2011-11-27 02:59:28 +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
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
d44c5f5b10 move_dir: Restrict to {-1,0,1} 2011-11-27 02:22:14 +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
6a3d9b2e4a Destroy agent on disconnect; another agent can connect later 2011-11-26 23:59:31 +01:00
Petr Baudis
978a080656 ~connection(): Close file descriptor 2011-11-26 23:43:52 +01:00
Petr Baudis
1ed67c81b6 Maintain and broadcast current tick id 2011-11-26 23:31:28 +01:00
Petr Baudis
6b3a51139a Support for (read-only) TCP connection agent communication 2011-11-26 23:24:06 +01:00