From a14da2fe3864712dab4e7c4cfb5c323026d668de Mon Sep 17 00:00:00 2001 From: Aargh Rai Date: Fri, 10 Jul 2026 16:01:57 +0530 Subject: moving header files to include directory & moving resources in it's own directory i know currently there is race condition, but the code is getting too messy, i will continue to this after i make a vis tool to analyse how i should split up files & stuff the code rn needs intense restructing for it to make any more progress --- src/ipc.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/ipc.c') diff --git a/src/ipc.c b/src/ipc.c index 99332ae..5caf71e 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -22,6 +22,24 @@ void add_comm_move(comm_moves *moves, struct uci_move move) { moves->moves[moves->count++] = move; } + +bool should_continue(struct engine_message *message, struct go_args* go) { + int depth; + int nodes; + int mate; + if (go->depth && (go->depth >= message->depth)) { + return false; + } + if (go->nodes && (go->nodes >= message->nodes)) { + message->node_limit = true; + return false; + } + if (go->mate && message->mate && (go->mate <= message->mate)) { + return false; + } + return true; +} + #include "fen.c" #include "bitboard.c" -- cgit v1.2.3