X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard2uci.cpp;h=72e81e45f3c96574b5938543d10d1c202f16fd30;hb=92a5061fe11dab6ef0bb339cbe7798e6ccb35626;hp=ed241a0b94900cba41ab9f6db8d4f239fe66cbce;hpb=6442b61046f46f65bfc4bf0b3727abe2dc27acb8;p=polyglot.git diff --git a/xboard2uci.cpp b/xboard2uci.cpp index ed241a0..72e81e4 100644 --- a/xboard2uci.cpp +++ b/xboard2uci.cpp @@ -112,9 +112,9 @@ static void learn (int result); // functions -// xboard_init() +// xboard2uci_init() -void xboard_init() { +void xboard2uci_init() { // init game_clear(Game); @@ -161,26 +161,14 @@ void xboard_init() { XB->opp_time = 300.0; } -void xboard_step(char string[]) { +// xboard2uci_gui_step() + +void xboard2uci_gui_step(char string[]) { int move; char move_string[256]; board_t board[1]; - static bool firsttime=true; - - if(firsttime){ - if((match(string,"uci"))){ - my_log("POLYGLOT *** Switching to UCI mode ***\n"); - send_uci_options(); - option_set("UCI","true"); - return; - }else{ - //uci_send_isready(Uci); // In UCI mode this done by the GUI - //Grrr...Toga can fixes the number of threads after "isready" - //So we delay "isready" - } - firsttime=false; - } + if (false) { } else if (match(string,"accepted *")) { @@ -479,7 +467,7 @@ void xboard_step(char string[]) { } else if (XB->has_feature_egt && match(string,"egtpath * *")){ char *type=Star[0]; char *path=Star[1]; - if(!my_string_case_equal(Star[0],"nalimov")){ + if(!my_string_case_equal(type,"nalimov")){ // refuse gui_send(GUI,"Error (unsupported table base format): %s",string); }else if(my_string_empty(path)){ @@ -661,9 +649,9 @@ void xboard_step(char string[]) { return; } -// engine_step() +// xboard2uci_engine_step() -void engine_step(char string[]) { +void xboard2uci_engine_step(char string[]) { int event; event = uci_parse(Uci,string); @@ -851,7 +839,7 @@ static void comp_move(int move) { ASSERT(State->state==THINK); ASSERT(!XB->analyse); - if(option_get_bool("RepeatPV")==true) + if(option_get_bool("RepeatPV")) send_pv(); // to update time and nodes // send the move @@ -1132,8 +1120,6 @@ static void search_update() { int move; int move_nb; board_t board[1]; - int nalimov_cache; - int real_memory; ASSERT(!Uci->searching);