Lines behind the game definition starting with # (after an empty
such line) are sent to the GUI with a 'piece' prefix. This allows
Fairy-Max to implement the new XBoard protocol for communicating
piece moves to the GUI, so the latter can do legality testing and
better SAN generation.
Line 2: initial setup of white pieces on back rank\r
Line 3: initial setup of black pieces on back rank\r
Line 4-18: Description of piece types that can occur in the variant\r
+This can be followed by some optional info to be sent to GUI when it\r
+selects the variant, e.g. to tell it how some non-standard pieces move.\r
\r
There can be upto 15 piece types per variant, numbered 1 to 15.\r
Numbers 1 and 2 are considered Pawns for white and black, respectively,\r
c=0; if(i>15 || j>255) break;\r
}\r
\r
- fclose(f);\r
sh = w[7] < 250 ? 3 : 0;\r
if(ptc > 1) { // setup board in GUI, by sending it pieceToCharTable and FEN\r
if(ptc == 2) printf("setup (%s) ", pieceToChar);\r
if(makruk) printf("8/");\r
for(i=0; i<BW; i++) printf("%c", piecename[oo[i]]+'@'); printf(" w KQkq - 0 1\n");\r
}\r
+ while(fscanf(f, " # %[^\n]", pieceToChar)) printf("piece %s\n", pieceToChar);\r
+ fclose(f);\r
}\r
\r
int main(int argc, char **argv)\r