X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=88fed007fc8ad26bd8318b4cf06ba4de3cd10cee;hb=55cafba6c2f03dec96d41f7a85c03d4cd641190a;hp=39467aeae6f8fc4ff54ea1497e36755ca6a25300;hpb=665a404fb62e2092170f221e27c9ba9423850bfe;p=xboard.git diff --git a/backend.c b/backend.c index 39467ae..88fed00 100644 --- a/backend.c +++ b/backend.c @@ -847,6 +847,7 @@ InitEngine (ChessProgramState *cps, int n) cps->analyzing = FALSE; cps->initDone = FALSE; cps->reload = FALSE; + cps->pseudo = appData.pseudo[n]; /* New features added by Tord: */ cps->useFEN960 = FALSE; @@ -9136,6 +9137,10 @@ printf("score=%d count=%d\n",score,count); Don't use it. */ cps->sendTime = 0; } + if (cps->pseudo) { // [HGM] pseudo-engine, granted unusual powers + if (sscanf(message, "wtime %ld\n", &whiteTimeRemaining) == 1 || // adjust clock times + sscanf(message, "btime %ld\n", &blackTimeRemaining) == 1 ) return; + } /* * If chess program startup fails, exit with an error message. @@ -10841,6 +10846,7 @@ SwapEngines (int n) SWAP(accumulateTC, h) SWAP(drawDepth, h) SWAP(host, p) + SWAP(pseudo, h) } int @@ -17633,12 +17639,12 @@ PositionToFEN (int move, char *overrideCastling, int moveCounts) if(PieceToChar(piece) == '+') { /* [HGM] write promoted pieces as '+' (Shogi) */ *p++ = '+'; - piece = (ChessSquare)(DEMOTED piece); + piece = (ChessSquare)(CHUDEMOTED piece); } *p++ = (piece == DarkSquare ? '*' : PieceToChar(piece)); if(p[-1] == '~') { /* [HGM] flag promoted pieces as '~' (Crazyhouse) */ - p[-1] = PieceToChar((ChessSquare)(DEMOTED piece)); + p[-1] = PieceToChar((ChessSquare)(CHUDEMOTED piece)); *p++ = '~'; } }