From: H.G.Muller Date: Wed, 5 Mar 2014 09:49:01 +0000 (+0100) Subject: Fix bug NonPromotionPossible for mini-Shogi X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=ef305e06b93ed27dd376c1f3ea8e0a7041a73943;p=gnushogi.git Fix bug NonPromotionPossible for mini-Shogi For Pawns the check for last-rank was not adapted to 5x5 board. --- 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)); }