if(option_find(Uci->option,"UCI_DrawOffers")){
my_log("POLYGLOT draw from XB received");
uci_send_option(Uci,"DrawOffer","%s","draw");}
+ else if (option_get_bool(Option,"HandleDraws") && Uci->root_move_nb > 20) { // [HGM] PG draw handling
+ my_log("POLYGLOT draw from XB received");
+ if (Uci->best_score <= -option_get_int(Option,"ContemptScore"))
+ gui_send(GUI,"offer draw");}
} else if (match(string,"easy")) {
XB->ponder = FALSE;
my_log("POLYGLOT %d move%s with resign score\n",State->resign_nb,(State->resign_nb>1)?"s":"");
if (State->resign_nb >= option_get_int(Option,"ResignMoves")) {
- my_log("POLYGLOT *** RESIGN ***\n");
- gui_send(GUI,"resign");
+ if (!option_get_bool(Option,"QueenNeverResigns") || !board_has_queen(board, board->turn)) { // [HGM] suppress resignig with Queen
+ my_log("POLYGLOT *** RESIGN ***\n");
+ gui_send(GUI,"resign");
+ }
}
} else {