X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard2uci.c;h=80e0a623a9e861d07ba8b9958048e6f38a3684a9;hb=e516b96c20d27e7d86d3485b010d6d48cecec9f1;hp=06a20706fdbf3b4eeb137b90fd64c9041b346ff4;hpb=de010509fa0e57ba955da6512c714fbff8606af3;p=polyglot.git diff --git a/xboard2uci.c b/xboard2uci.c index 06a2070..80e0a62 100644 --- a/xboard2uci.c +++ b/xboard2uci.c @@ -305,7 +305,7 @@ void xboard2uci_gui_step(char string[]) { } else if (match(string,"new")) { - uci_send_isready(Uci); + uci_send_isready_sync(Uci); my_log("POLYGLOT NEW GAME\n"); option_set(Option,"Chess960","false"); @@ -356,7 +356,7 @@ void xboard2uci_gui_step(char string[]) { if (DelayPong) { if (XB->ping >= 0) gui_send(GUI,"pong %d",XB->ping); // HACK: get rid of old ping XB->ping = atoi(Star[0]); - uci_send_isready(Uci); + uci_send_isready_sync(Uci); } else { ASSERT(XB->ping==-1); gui_send(GUI,"pong %s",Star[0]); @@ -752,18 +752,18 @@ void xboard2uci_engine_step(char string[]) { } } if(((event & EVENT_ILLEGAL_MOVE)!=0) && (State->state == THINK)){ - game_get_board(Game,board); - if(board->turn==White){ - gui_send(GUI,"0-1 {polyglot: resign" - " (illegal engine move white)}"); - }else{ - gui_send(GUI,"1-0 {polyglot: resign" - " (illegal engine move black)}"); - } - board_disp(board); - XB->result = TRUE; - mess(); - } + game_get_board(Game,board); + if(board->turn==White){ + gui_send(GUI,"0-1 {polyglot: resign" + " (illegal engine move by white: %s)}",Uci->bestmove); + }else{ + gui_send(GUI,"1-0 {polyglot: resign" + " (illegal engine move by black: %s)}",Uci->bestmove); + } + board_disp(board); + XB->result = TRUE; + mess(); + } } // format_xboard_option_line