The test for Alfil (suppressing single steps on the Elephant) contained
a wrong logical operator, so that it could never be active. It also
failed to include Xiangqi as variant with traditional Alfil. This led to
one-step moves of the Elephant in these variants, and false check or
unreliable mate detections.
Fix move of Xiangqi Elephant
&& !SameColor(board[rf][ff], board[rt][ft]))
callback(board, flags, NormalMove,
rf, ff, rt, ft, closure);
- if(gameInfo.variant == VariantShatranj && gameInfo.variant == VariantCourier) continue; // classical Alfil
+ if(gameInfo.variant == VariantShatranj || gameInfo.variant == VariantCourier
+ || gameInfo.variant == VariantXiangqi) continue; // classical Alfil
rt = rf + rs; // in unknown variant we assume Modern Elephant, which can also do one step
ft = ff + fs;
if (!(rt < 0 || rt >= BOARD_HEIGHT || ft < BOARD_LEFT || ft >= BOARD_RGHT)