projects
/
gnushogi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
d00d0b5
)
Fix bug NonPromotionPossible for mini-Shogi
author
H.G.Muller
<hgm@hgm-xboard.(none)>
Wed, 5 Mar 2014 09:49:01 +0000 (10:49 +0100)
committer
H.G.Muller
<hgm@hgm-xboard.(none)>
Wed, 5 Mar 2014 09:49:01 +0000 (10:49 +0100)
For Pawns the check for last-rank was not adapted to 5x5 board.
gnushogi/genmove.c
patch
|
blob
|
history
diff --git
a/gnushogi/genmove.c
b/gnushogi/genmove.c
index
a2c1c09
..
2f4db1b
100644
(file)
--- 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));
}