X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=UCI2WB.c;h=459c7481eafc78e728f18e4771b67f53553f0a33;hb=1f508cfef32d91d668bdac6a0d9ad303012ae46d;hp=781f8f5bc1912d6bf41f769471672557f29efb39;hpb=4ab8d7efe96ed40e3ae2abf2ef5e55379888cfde;p=uci2wb.git diff --git a/UCI2WB.c b/UCI2WB.c index 781f8f5..459c748 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -9,7 +9,7 @@ /* of which you should have received a copy together with this file. */ /****************************************************************************/ -#define VERSION "2.0" +#define VERSION "2.1" #include #include @@ -251,6 +251,7 @@ Engine2GUI() // move was a move to be played if(p = strstr(line+8, " draw")) *p = 0, printf("offer draw\n"); // UCCI if(strstr(line+9, "resign")) { printf("resign\n"); computer = NONE; } + if(strstr(line+9, "win")) { printf("%s {claim}\n", stm== WHITE ? "1-0" :"0-1"); computer = NONE; } // USI if(strstr(line+9, "(none)") || strstr(line+9, "null") || strstr(line+9, "0000")) { printf("%s\n", lastScore < -99999 ? "resign" : "1/2-1/2 {stalemate}"); computer = NONE; } sscanf(line, "bestmove %s", move[moveNr++]); @@ -453,7 +454,7 @@ GUI2Engine() if(!variants) variants = sc=='s' ? "shogi,5x5+5_shogi" : VARIANTS; printf("feature variants=\"%s\" setboard=1 usermove=1 debug=1 ping=1 reuse=0 exclude=1 pause=1 sigint=0 sigterm=0 done=0\n", variants); printf("feature option=\"UCI2WB debug output -check %d\"\n", debug); - if(sc == 's') printf("feature option=\"Floating Byoyomi -check %d\" option=\"Byoyomi -spin %d -1 1000\"\n", flob, byo); + if(sc == 's') printf("feature option=\"Floating Byoyomi -check %d\"\nfeature option=\"Byoyomi -spin %d -1 1000\"\n", flob, byo); fprintf(toE, sc == 'x' ? "ucci\n" : "u%ci\n", sc); fflush(toE); // prompt UCI engine for options Sync(PAUSE); // wait for uciok }