#ifndef IPC_C #define IPC_C #include "ipc.h" comm_moves comm_moves_init() { return (comm_moves) { malloc(sizeof(struct uci_move) * 50), 0, 50 }; } void add_comm_move(comm_moves *moves, struct uci_move move) { if (moves->count + 1 > moves->capacity) { moves->capacity += 50; moves->moves = realloc( moves->moves, moves->capacity * sizeof(struct uci_move) ); } moves->moves[moves->count++] = move; } #include "fen.c" #include "bitboard.c" #endif // IPC_C