From 89b2fc0e2d267a6bea4697ee655dc32ef5afb087 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Thu, 29 Sep 2011 00:03:51 +0200 Subject: [PATCH] Fix another hardcored 9x9-board hardcoded value. --- gnushogi/eval.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) 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)) */ -- 1.7.0.4