From: H.G. Muller Date: Sun, 2 Sep 2012 16:24:33 +0000 (+0200) Subject: Fix bug in setting up w3 and w4 games X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=909e1e2feff0307c676d9cb96a881566baf6c6e1;p=capablanca.git Fix bug in setting up w3 and w4 games The expression to generate a random NBRQ in fact generated a random NBRA, because of altered piece encoding. --- diff --git a/lasker-2.2.3/src/board.c b/lasker-2.2.3/src/board.c index f2fa5f0..eae3b48 100644 --- a/lasker-2.2.3/src/board.c +++ b/lasker-2.2.3/src/board.c @@ -1361,7 +1361,7 @@ static void wild_update(board_t b, int style) place_piece(b, W_KING, ANY_SQUARE, 8); for (i = 0; i < 8; i++) { if (b[i][0] != W_KING) { - b[i][0] = (random() % 4) + 2; + b[i][0] = (random() % 4) + 2; if(b[i][0] == 5) b[i][0] += 3; } } /* Black mirrors White */ @@ -1374,7 +1374,7 @@ static void wild_update(board_t b, int style) place_piece(b, W_KING, ANY_SQUARE, 8); for (i = 0; i < 8; i++) { if (b[i][0] != W_KING) { - b[i][0] = (random() % 4) + 2; + b[i][0] = (random() % 4) + 2; if(b[i][0] == 5) b[i][0] += 3; } } /* Black has same set of pieces, but randomly permuted, except that Black