From: Yann Dirson Date: Wed, 28 Sep 2011 22:03:51 +0000 (+0200) Subject: Fix another hardcored 9x9-board hardcoded value. X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=89b2fc0e2d267a6bea4697ee655dc32ef5afb087;p=gnushogi.git Fix another hardcored 9x9-board hardcoded value. --- diff --git a/gnushogi/eval.c b/gnushogi/eval.c index 355acf3..8e7bd06 100644 --- a/gnushogi/eval.c +++ b/gnushogi/eval.c @@ -1291,7 +1291,8 @@ PawnValue(short sq, short side) { if (crow(c1, sq) == 2) /* pawn on 3d rank */ { - if (board[(c1 == black) ? (sq + 27) : (sq - 27)] == pawn) + if (board[(c1 == black) ? + (sq + 3*NO_COLS) : (sq - 3*NO_COLS)] == pawn) { /* opposing pawn has been moved (even column == (sq & 1)) */