Fix spurious promotion for redefined Pawns in Xiangqi
authorH.G.Muller <hgm@hgm-xboard.(none)>
Wed, 7 Oct 2020 21:20:14 +0000 (23:20 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Wed, 7 Oct 2020 21:20:14 +0000 (23:20 +0200)
commitbfad37ff0b19741ac44a75b062723138b588a975
tree8bb6b93e5fb46a30f65d18d4d6a8c7f02244e0a3
parent162b8332ad7db1a6042828afe49f18b0bdbc2503
Fix spurious promotion for redefined Pawns in Xiangqi

The Betza move generator, used for pieces with moves redefined by the
'piece' command, always generated Pawn moves to last rank as promotions.
In Xiangqi this had the undesired effect that promotion suffixes were
considered missing on such moves arriving as text, and a default promotion
to Queen was appended to them. Which made the Pawns disappear, as a Queen
normally does not participate in Xiangqi.
  Now the MovesFromString routine suppresses promotion in Xiangqi and
Janggi. It still doesn't pay attention to zone depth in other variants.
moves.c