From 909e1e2feff0307c676d9cb96a881566baf6c6e1 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 2 Sep 2012 18:24:33 +0200 Subject: [PATCH] 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. --- lasker-2.2.3/src/board.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) 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 -- 1.7.0.4