char *array; // initial position\r
} VariantDesc;\r
\r
-typedef enum { V_CHESS, V_SHO, V_CHU, V_DAI, V_DADA, V_MAKA, V_TAI, V_KYOKU, V_TENJIKU, V_SHATRANJ, V_MAKRUK, V_LION } Variant;\r
+typedef enum { V_SAME, V_CHESS, V_SHO, V_CHU, V_DAI, V_DADA, V_MAKA, V_TAI, V_KYOKU, V_TENJIKU, V_SHATRANJ, V_MAKRUK, V_LION } Variant;\r
\r
VariantDesc variants[] = {\r
{ 16, 8, 8, 1, V_CHESS, "normal", chessArray }, // FIDE\r
int i, j, k;\r
PieceDesc *pawn;\r
\r
+ if(var != V_SAME) { // the following should be already set if we stay in same variant (for TakeBack)\r
currentVariant = variants[var].varNr;\r
bWidth = variants[var].boardWidth;\r
bHeight = variants[var].boardRanks;\r
zone = variants[var].zoneDepth;\r
array = variants[var].array;\r
+ }\r
bsize = bWidth*bHeight;\r
chuFlag = (currentVariant == V_CHU || currentVariant == V_LION);\r
tenFlag = (currentVariant == V_TENJIKU);\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
+ Init(V_SAME); stm = Setup2(startPos);\r
printf("# setup done");fflush(stdout);\r
for(moveNr=0; moveNr<last; moveNr++) stm = MakeMove2(stm, gameMove[moveNr]),printf("make %2d: %x\n", moveNr, gameMove[moveNr]);\r
return stm;\r