{ 7, 7, 6, 2, "torishogi\n", toriIDs, toriFEN, toriDirs, toriProms, toriCodes, toriValues },
};
-#define TORI_NR 7 /* must correspond to index of torishogi (which must be last) in table above! */
-#define KNIGHTLESS 4 /* first variant without a Knight (except mini-, which has no 2-rank zone) */
+#define TORI_NR 7 /* must correspond to index of torishogi (which must be last) in table above! */
+#define MINI_NR 1
+#define KNIGHTLESS 4 /* first variant without a Knight (except mini-, which has no 2-rank zone) */
// info per piece type. sometimes indexed by negated holdings count instead of piece
#define pieceKey (rawKey+1)
printf("\n");
}
- maxDrop += (v==2 || v==1); // Judkins & mini-Shogi have dummy Lance
+ maxDrop += (v==MINI_NR+1 || v==MINI_NR); // Judkins & mini-Shogi have dummy Lance
// board
ClearBoard();
}
for(r=0; r<zone; r++) { // board-size table to indicate promotion zones and force-promotion zones
for(f=0; f<nrFiles; f++) {
- int xr = nrRanks - 1 - r, c = Z_MUST | COLOR | (r==0)*Z_LAST | (r<2 && v!=1)*Z_2ND; // in mini-Shogi forelast not in zone
+ int xr = nrRanks - 1 - r, c = Z_MUST | COLOR | (r==0)*Z_LAST | (r<2 && v!=MINI_NR)*Z_2ND; // in mini-Shogi forelast not in zone
zoneTab[22*r + f] = Z_BLACK & c;
zoneTab[22*xr + f] = Z_WHITE & c;
}
else {
for(i=moveNr+ply-2; i>=d; i-=2) if(checkHist[i+1] == CK_NONE) break;
if(i < d) score = INF-1; // we are suffering a perpetual, so lose
- else if(perpLoses == 1) score = (stm == WHITE ? -INF : INF-1); // mini-Shogi, sente loses
+ else if(perpLoses == MINI_NR) score = (stm == WHITE ? -INF : INF-1); // mini-Shogi, sente loses
else if(perpLoses == TORI_NR) score = -INF; // Tori Shogi, repeating loses
}