Bitboard sliderAttacks = 0;
Bitboard sliders = pos.checkers();
+ // Passing move by king
+ if (pos.king_pass())
+ *moveList++ = make<SPECIAL>(ksq, ksq);
+
// Consider all evasion moves for special pieces
if (sliders & (pos.pieces(CANNON, BANNER) | pos.pieces(HORSE, ELEPHANT) | pos.pieces(JANGGI_CANNON, JANGGI_ELEPHANT)))
{
Bitboard occupied = (type_of(m) != DROP ? pieces() ^ from : pieces()) | to;
// Flying general rule and bikjang
- // In case of bikjang passing is allowed
- if ((var->flyingGeneral && count<KING>(us)) || (st->bikjang && !(type_of(moved_piece(m)) == KING && from == to)))
+ // In case of bikjang passing is always allowed, even when in check
+ if (st->bikjang && type_of(m) == SPECIAL && from == to)
+ return true;
+ if ((var->flyingGeneral && count<KING>(us)) || st->bikjang)
{
Square s = type_of(moved_piece(m)) == KING ? to : square<KING>(us);
if (attacks_bb(~us, ROOK, s, occupied) & pieces(~us, KING) & ~square_bb(to))