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?p=gnushogi.git;a=commitdiff_plain;h=24968d3e56b2dae93e5652d0b3fa68c122f52082 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 208966d..f6a0ac3 100644 --- a/gnushogi/genmove.c +++ b/gnushogi/genmove.c @@ -350,13 +350,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)); }