Adopt new method for indicating promotion-zone depth
[fairymax.git] / fairymax.c
index 560f64d..94edc78 100644 (file)
@@ -498,6 +498,7 @@ void LoadGame(char *name)
         /* We have found variant, or if none specified, are at beginning of file */\r
         if(fscanf(f, "%dx%d", &BW, &BH)!=2 || BW>12 || BH!=8)\r
         { printf("telluser unsupported board size %dx%d\n",BW,BH); exit(0); }\r
+        makruk = 0; if(fscanf(f, "=%d", &i)) makruk=64; // new method to indicate deviant zone depth (for now assumes 3)\r
 \r
         for(i=0; i<BW; i++) fscanf(f, "%d", oo+i);\r
         for(i=0; i<BW; i++) fscanf(f, "%d", oo+i+16);\r
@@ -521,7 +522,6 @@ void LoadGame(char *name)
 \r
         fclose(f);\r
        sh = w[7] < 250 ? 3 : 0;\r
-       makruk = w[7]==181 ? 64 : 0; // w[7] is used as kludge to enable makruk promotions\r
         if(name == selectedFairy) {\r
             printf(ptc == 1 ? "setup " : "setup (%s) ", pieceToChar); // setup board in GUI\r
             for(i=0; i<BW; i++) printf("%c", piecename[oo[i+16]]+'`'); printf("/");\r