int pv[10000],*sp=pv; // triangular array\r
int margin;\r
\r
-pboard()\r
+void pboard()\r
{int i;\r
i=-1;W(++i<128)printf(" %c",(i&15)==BW&&(i+=15-BW)?10:n[b[i]&31]);\r
}\r
\r
int PrintResult(int s)\r
{\r
- int i, j, k, cnt=0;\r
+ int j, k, cnt=0;\r
\r
/* search last 50 states with this stm for third repeat */\r
for(j=2; j<=100 && j <= HistPtr; j+=2)\r
}\r
\r
\r
-InitEngine()\r
+void InitEngine()\r
{\r
- int i, j;\r
-\r
N=32*S+7;W(N-->S+3)T[N]=rand()>>9;\r
srand(GetTickCount());\r
}\r
\r
-InitGame()\r
+void InitGame()\r
{\r
- int i,j,k=0;\r
+ int i,k=0;\r
\r
Side = WHITE; Q=0; O=S;\r
Fifty = 0; R = 0;\r
\r
void CopyBoard(int s)\r
{\r
- int i, j, k, cnt=0;\r
+ int i, j;\r
\r
/* copy game representation of engine to HistoryBoard */\r
/* don't forget castling rights and e.p. state! */\r
\r
void PrintVariants(int combo)\r
{\r
- int i, j, count=0, total=0; char c=EOF+1, buf[80];\r
+ int count=0, total=0; char c=EOF+1, buf[80];\r
FILE *f;\r
\r
f = fopen(INI_FILE, "r");\r
printf("feature done=1\n");\r
}\r
\r
-int LoadGame(char *name)\r
+void LoadGame(char *name)\r
{\r
int i, j, ptc, count=0; char c, buf[80], pieceToChar[80];\r
static int currentVariant;\r
\r
int main(int argc, char **argv)\r
{\r
- int Computer, MaxTime, MaxMoves, TimeInc, sec, i, j;\r
- char line[256], command[256], c, cc;\r
- int m, nr, hh;\r
+ int Computer, MaxTime, MaxMoves, TimeInc, sec, i;\r
+ char line[256], command[256], c;\r
+ int m, nr;\r
double cpuT;\r
- FILE *f;\r
\r
if(argc>1 && sscanf(argv[1], "%d", &m)==1)\r
{ U = (1<<m)-1; argc--; argv++; }\r
continue;\r
}\r
if (!fgets(line, 256, stdin))\r
- return;\r
+ return 1;\r
if (line[0] == '\n')\r
continue;\r
sscanf(line, "%s", command);\r
}\r
if (!strcmp(command, "quit"))\r
/* exit engine */\r
- return;\r
+ return 0;\r
if (!strcmp(command, "force")) {\r
/* computer plays neither */\r
Computer = EMPTY;\r