#ifndef IPC_H #define IPC_H // NOT TRUE IPC: I REALISED I AM STUPID AND COULD HAVE JUST USED THREADS #include #include #include "fen.h" #include "uci/state.h" typedef struct { struct uci_move *moves; int count; int capacity; } comm_moves; struct engine_message { int ready; int depth; int seldepth; int multipv; int score_cp; int nodes; int nps; int hashfull; int tbhits; int time; comm_moves pv; struct engine_message *next; }; typedef struct { struct engine_message **data; int count; } engine_messages; enum { MESSAGE_FILLED, MESSAGE_READ, MESSAGE_PROCESSED }; typedef struct { engine_messages *engine_messages; uci_state state; int uci_message_ready; struct fen_load from_position; comm_moves moves; } comms; comm_moves comm_moves_init(); void add_comm_move(comm_moves *moves, struct uci_move move); #endif // IPC_H