X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=21560911b2317205a0dec289d5a76cc680ca1fe1;hb=cf736a0286ed40b6e671e77fd080812edd75f80b;hp=efe3b0e132339c06aaa13d22f759763f2b7e55fb;hpb=7daad56f2ec6185fd0b1f0ca20f31a874bd2fc69;p=xboard.git diff --git a/backend.c b/backend.c index efe3b0e..2156091 100644 --- a/backend.c +++ b/backend.c @@ -8305,6 +8305,17 @@ FakeBookMove: // [HGM] book: we jump here to simulate machine moves after book h MakeMove(fromX, fromY, toX, toY, promoChar);/*updates forwardMostMove*/ + /* Test suites abort the 'game' after one move */ + if(*appData.finger) { + static FILE *f; + char *fen = PositionToFEN(backwardMostMove, NULL, 0); // no counts in EPD + if(!f) f = fopen(appData.finger, "w"); + if(f) fprintf(f, "%s bm %s;\n", fen, parseList[backwardMostMove]), fflush(f); + else { DisplayFatalError("Bad output file", errno, 0); return; } + free(fen); + GameEnds(GameUnfinished, NULL, GE_XBOARD); + } + /* [AS] Adjudicate game if needed (note: remember that forwardMostMove now points past the last move) */ if( gameMode == TwoMachinesPlay && adjudicateLossThreshold != 0 && forwardMostMove >= adjudicateLossPlies ) { int count = 0;