// promotions by pieces with Lion power stepping in & out the zone in same turn\r
// promotion on capture\r
\r
-#define VERSION "0.14e"\r
+#define VERSION "0.15"\r
\r
#define PATH level==0 /*|| path[0] == 0x3490a && (level==1 || path[1] == 0x285b3 && (level == 2 || path[2] == 0x8710f && (level == 3 /*|| path[3] == 0x3e865 && (level == 4 || path[4] == 0x4b865 && (level == 5)))))*/\r
//define PATH 0\r
if(isalpha(*fen)) {\r
char *table = fenNames;\r
n = *fen > 'Z' ? 'a' - 'A' : 0;\r
- if((currentVariant == V_CHESS || currentVariant == V_SHATRANJ || currentVariant == V_MAKRUK) && *fen - n == 'N' // In Chess N is Knight, not Lion\r
+ if((currentVariant == V_CHESS || currentVariant == V_SHATRANJ ||\r
+ currentVariant == V_MAKRUK || currentVariant == V_SHO) && *fen - n == 'N' // In Chess N is Knight, not Lion\r
|| table[2* (*fen - 'A' - n)] == '.') *p++ = *fen; else {\r
*p++ = ':';\r
*p++ = table[2* (*fen - 'A' - n)] + n;\r
for(i=listStart; i<listEnd; i++) {\r
if(sqr == (moveStack[i]>>SQLEN & SQUARE)) {\r
int t = moveStack[i] & SQUARE;\r
- if(t >= SPECIAL) continue;\r
- b[t] = (!boardCopy[t] ? 'Y' : 'R'); cnt++;\r
+ if(t >= SPECIAL) {\r
+ int e = sqr + epList[t - SPECIAL]; // decode\r
+ b[e] = 'C';\r
+ continue;\r
+ }\r
+ if(!b[t]) b[t] = (!boardCopy[t] ? 'Y' : 'R'); cnt++;\r
+ if(moveStack[i] & PROMOTE) b[t] = 'M';\r
}\r
}\r
if(!cnt) { // no moves from given square\r
int TakeBack(int n)\r
{ // reset the game and then replay it to the desired point\r
int last, stm;\r
+ last = moveNr - n; if(last < 0) last = 0;\r
Init(currentVariant); stm = Setup2(startPos);\r
printf("# setup done");fflush(stdout);\r
- last = moveNr - n; if(last < 0) last = 0;\r
for(moveNr=0; moveNr<last; moveNr++) stm = MakeMove2(stm, gameMove[moveNr]),printf("make %2d: %x\n", moveNr, gameMove[moveNr]);\r
return stm;\r
}\r