From ef305e06b93ed27dd376c1f3ea8e0a7041a73943 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Wed, 5 Mar 2014 10:49:01 +0100 Subject: [PATCH] Fix bug NonPromotionPossible for mini-Shogi For Pawns the check for last-rank was not adapted to 5x5 board. --- gnushogi/genmove.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/gnushogi/genmove.c b/gnushogi/genmove.c index a2c1c09..2f4db1b 100644 --- a/gnushogi/genmove.c +++ b/gnushogi/genmove.c @@ -336,13 +336,21 @@ NonPromotionPossible(short color, case pawn : if (color == black) { +#ifdef MINISHOGI + return ((t < 20) +#else return ((t < 72) +#endif ? true : (generate_move_flags ? ILLEGAL_TRAPPED : false)); } else { +#ifdef MINISHOGI + return ((t > 4) +#else return ((t > 8) +#endif ? true : (generate_move_flags ? ILLEGAL_TRAPPED : false)); } -- 1.7.0.4