X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=fairymax.c;h=f476379599ab2d70e07924d245ef7c39c84ca800;hb=e1316b1f8666776e17ab816faf28622306aa56e8;hp=5341cd2fd00cb9983840fde9d22ac0ad347e646e;hpb=b6a7fa8ae7c54db7bb5a9415ccae3fd55e9b360e;p=fairymax.git diff --git a/fairymax.c b/fairymax.c index 5341cd2..f476379 100644 --- a/fairymax.c +++ b/fairymax.c @@ -18,7 +18,7 @@ /*****************************************************************/ #define MULTIPATH -#define VERSION "4.8S" +#define VERSION "4.8T" #include #include @@ -342,6 +342,11 @@ int PrintResult(int s) } differs: ; } + + + + + K=I; cnt = D(s,-I,I,Q,O,LL|4*S,3); #ifdef SHATRANJ @@ -438,7 +443,7 @@ void PrintVariants(int combo) while((c = fgetc(f)) != EOF && c != '\n'); if(c == EOF) break; total++; - if(combo == (strstr(buf, "fairy/") != buf)) continue; + if(*buf < 'a' || combo == (strstr(buf, "fairy/") != buf)) continue; if(combo && count == 0) strcpy(selectedFairy, buf); if(count++) printf(combo ? " /// " : ","); printf("%s", combo ? buf+6 : buf); @@ -455,7 +460,7 @@ void PrintOptions() printf("feature option=\"Ini File -file %s\"\n", inifile); printf("feature option=\"Multi-PV Margin -spin %d 0 1000\"\n", margin); printf("feature option=\"Variant fairy selects -combo "); PrintVariants(1); printf("\"\n"); - printf("feature option=\"Makruk rules -combo makruk /// cambodian /// ai-wok\"\n"); + printf("feature option=\"Makruk rules -combo makruk /// Cambodian /// Ai-wok\"\n"); printf("feature option=\"Dummy Slider Example -slider 20 0 100\"\n"); printf("feature option=\"Dummy String Example -string happy birthday!\"\n"); printf("feature option=\"Dummy Path Example -path .\"\n"); @@ -465,7 +470,7 @@ void PrintOptions() void LoadGame(char *name) { - int i, j, ptc, count=0; char c, buf[80], pieceToChar[80]; + int i, j, ptc=0, count=0; char c, buf[80], pieceToChar[80], parent[80]; static int currentVariant; FILE *f; @@ -483,7 +488,7 @@ void LoadGame(char *name) if(!strcmp(name, "makruk")) name = Cambodian; else if(!strcmp(name, "fairy")) name = selectedFairy; gating = !strcmp(name, "seirawan"); - while((ptc=fscanf(f, "Game: %s # %s", buf, pieceToChar))==0 || strcmp(name, buf) ) { + while((ptc=fscanf(f, "Game: %s # %s # %s", buf, pieceToChar, parent))==0 || strcmp(name, buf) ) { while((c = fgetc(f)) != EOF && c != '\n'); count++; if(c == EOF) { @@ -520,10 +525,10 @@ void LoadGame(char *name) c=0; if(i>15 || j>255) break; } - fclose(f); sh = w[7] < 250 ? 3 : 0; - if(name == selectedFairy || makruk) { - printf(ptc == 1 ? "setup " : "setup (%s) ", pieceToChar); // setup board in GUI + if(ptc > 1) { // setup board in GUI, by sending it pieceToCharTable and FEN + if(ptc == 2) printf("setup (%s) ", pieceToChar); + else printf("setup (%s) %dx%d+0_%s ", pieceToChar, BW, BH, parent); for(i=0; i