The corridors used to head towards the goal using the straightest
possible line, often making a zig-zag beeline. Allow some slight variance,
sometimes going straight instead of turning, reducing the predictability,
and making those monotonously turning corridors less likely.
dix = abs(xx - tx);
diy = abs(yy - ty);
+ if ((dix > diy) && diy && !rn2(dix-diy+1)) {
+ dix = 0;
+ } else if ((diy > dix) && dix && !rn2(diy-dix+1)) {
+ diy = 0;
+ }
+
/* do we have to change direction ? */
if (dy && dix > diy) {
register int ddx = (xx > tx) ? -1 : 1;