Allow overlapping promotions zones
authorH.G.Muller <hgm@hgm-xboard.(none)>
Tue, 10 Apr 2018 15:26:08 +0000 (17:26 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Tue, 10 Apr 2018 16:16:42 +0000 (18:16 +0200)
The white and black contributions to the zone flags are now ORed into
zoneTab[], (which would already have been cleared when starting any new
variant), so that they won't erase each other.

dropper.c

index eaea10c..74e0ea8 100644 (file)
--- a/dropper.c
+++ b/dropper.c
@@ -580,8 +580,8 @@ GameInit (char *name)
     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!=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;
+           zoneTab[22*r  + f] |= Z_BLACK & c;
+           zoneTab[22*xr + f] |= Z_WHITE & c;
        }
     }