char *array, *reason;\r
int bWidth, bHeight, bsize, zone, currentVariant;\r
int stm, xstm, hashKeyH, hashKeyL, framePtr, msp, nonCapts, rootEval, retMSP, retFirst, retDep, pvPtr, level, cnt50, chuFlag=1, tenFlag, mobilityScore;\r
-int nodes, startTime, tlim1, tlim2, repCnt;\r
+int nodes, startTime, tlim1, tlim2, repCnt, comp;\r
Move retMove, moveStack[10000], path[100], repStack[300], pv[1000], repeatMove[300];\r
\r
#define X 36 /* slider */\r
for(i=0; i<8; i++) { // scan all knight jumps to locate source\r
int x = sqr - nStep[i], attacker = board[x];\r
if(attacker == EMPTY || (attacker & TYPE) != stm) continue;\r
- if(p[attacker].range[i] <= N && p[attacker].range[i] >= S && p[attacker].range[i] != J) { // has Knight jump in our direction\r
+ if(p[attacker].range[i] <= L && p[attacker].range[i] >= S || p[attacker].range[i] == N) { // has Knight jump in our direction\r
NewCapture(x, sqr + victimValue, p[attacker].promoFlag); // plain jump (as in N)\r
if(p[attacker].range[i] < N) { // Lion power; generate double captures over two possible intermediates\r
int v = kStep[i]; // leftish path\r
if(!strcmp(command, "memory")) { SetMemorySize(atoi(inBuf+7)); continue; }\r
if(!strcmp(command, "ping")) { printf("pong%s", inBuf+4); continue; }\r
// if(!strcmp(command, "")) { sscanf(inBuf, " %d", &); continue; }\r
- if(!strcmp(command, "new")) { engineSide = BLACK; Init(V_CHESS); stm = Setup2(DEFAULT_FEN); maxDepth = MAXPLY; randomize = OFF; continue; }\r
+ if(!strcmp(command, "new")) {\r
+ engineSide = BLACK; Init(V_CHESS); stm = Setup2(DEFAULT_FEN); maxDepth = MAXPLY; randomize = OFF; comp = 0;\r
+ continue;\r
+ }\r
if(!strcmp(command, "setboard")){ engineSide = NONE; stm = Setup2(inBuf+9); continue; }\r
if(!strcmp(command, "easy")) { ponder = OFF; continue; }\r
if(!strcmp(command, "hard")) { ponder = ON; continue; }\r
if(!strcmp(command, "l")) { pplist(); continue; }\r
// ignored commands:\r
if(!strcmp(command, "xboard")) { continue; }\r
- if(!strcmp(command, "computer")){ continue; }\r
+ if(!strcmp(command, "computer")){ comp = 1; continue; }\r
if(!strcmp(command, "name")) { continue; }\r
if(!strcmp(command, "ics")) { continue; }\r
if(!strcmp(command, "accepted")){ continue; }\r
int move = ParseMove(inBuf+9);\r
if(move == INVALID) {\r
if(reason) printf("Illegal move {%s}\n", reason); else printf("%s\n", reason="Illegal move");\r
+ if(comp) PrintResult(stm, -INF); // against computer: claim\r
} else {\r
stm = MakeMove2(stm, move);\r
ponderMove = INVALID;\r