The least-sigificant bit in the zone table is nowused to indicate first
and second rank. This is used to forbid Pawn drops as check evasions.
Which is OK for crazyhouse, but is overruled on 1st rank for Shogi.
The last-2-ranks bits are suppressed in mini-Shogi (which has no Knight).
}
for(r=0; r<zone; r++) { // board-size table to indicate promotion zones and force-promotion zones
for(f=0; f<nrFiles; f++) {
- zoneTab[22*r + f] = Z_BLACK & (Z_MUST | COLOR | (r<2)*Z_2ND);
- zoneTab[22*(nrRanks-1-r)+f] = Z_WHITE & (Z_MUST | COLOR | (r<2)*Z_2ND);
+ 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
+ zoneTab[22*r + f] = Z_BLACK & c;
+ zoneTab[22*xr + f] = Z_WHITE & c;
}
}