mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-02 18:03:37 +02:00
Maintain and broadcast current tick id
This commit is contained in:
parent
3d485518b0
commit
1ed67c81b6
5 changed files with 16 additions and 4 deletions
|
@ -7,9 +7,9 @@
|
|||
#include "connection.h"
|
||||
|
||||
void
|
||||
connection::senses(char around[4])
|
||||
connection::senses(int tick_id, char around[4])
|
||||
{
|
||||
char buf[1024];
|
||||
snprintf(buf, sizeof(buf), "around %c%c%c%c\n\n", around[0], around[1], around[2], around[3]);
|
||||
snprintf(buf, sizeof(buf), "tick %d\naround %c%c%c%c\n\n", tick_id, around[0], around[1], around[2], around[3]);
|
||||
write(fd, buf, strlen(buf));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue