m:640 14,7 31,7 33,7 18,7 -14,7 -31,7 -33,7 -18,7 1,7 16,7 -1,7 -16,7 2,7 -2,7 32,7 -32,7\r
\r
// Spartan Chess, where black has a different army from white's orthodox FIDE, with two kings\r
-Game: fairy/Spartan\r
+Game: fairy/Spartan # PNBRQ..............K....q.lwg.....c...hk\r
8x8\r
6 4 5 7 11 5 4 6\r
3 9 11 8 8 11 10 3\r
\r
int LoadGame(char *name)\r
{\r
- int i, j, count=0; char c, buf[80];\r
+ int i, j, ptc, count=0; char c, buf[80], pieceToChar[80];\r
static int currentVariant;\r
FILE *f;\r
\r
if(name != NULL)\r
{ /* search for game name in definition file */\r
if(!strcmp(name, "fairy")) name = selectedFairy;\r
- while(fscanf(f, "Game: %s", buf)!=1 || strcmp(name, buf) ) {\r
+ while((ptc=fscanf(f, "Game: %s # %s", buf, pieceToChar))==0 || strcmp(name, buf) ) {\r
while((c = fgetc(f)) != EOF && c != '\n');\r
count++;\r
if(c == EOF) {\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
+ for(i=0; i<BW; i++) printf("%c", piecename[2]+'`'); printf("/");\r
+ for(i=2; i<BH-2; i++) printf("%d/", BW);\r
+ for(i=0; i<BW; i++) printf("%c", piecename[1]+'@'); printf("/");\r
+ for(i=0; i<BW; i++) printf("%c", piecename[oo[i]]+'@'); printf(" w KQkq - 0 1\n");\r
+ }\r
}\r
\r
int main(int argc, char **argv)\r