Bitboard occupied = (type_of(m) != DROP ? pieces() ^ from : pieces()) | to;
- // Flying general rule
- if (var->flyingGeneral && count<KING>(us))
+ // 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)))
{
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))
expect perft.exp courier startpos 4 500337 > /dev/null
expect perft.exp grand startpos 3 259514 > /dev/null
expect perft.exp xiangqi startpos 4 3290240 > /dev/null
- expect perft.exp janggi startpos 4 1075083 > /dev/null
+ expect perft.exp janggi startpos 4 1067293 > /dev/null
expect perft.exp janggi "fen 1n1kaabn1/cr2N4/5C1c1/p1pNp3p/9/9/P1PbP1P1P/3r1p3/4A4/R1BA1KB1R b - - 0 1" 4 76826 > /dev/null
fi