summaryrefslogtreecommitdiff
path: root/src/ipc/go_args.c
blob: 50f4b72797e1bb087bc0691515dc2dd8933dc408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "ipc/go_args.h"
#include <stdio.h>

bool should_continue(engine_message_t *message, go_args_t *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;
}