- if ((*step)++, piece_on(king_square(WHITE)) != W_KING)
- return false;
-
- if ((*step)++, piece_on(king_square(BLACK)) != B_KING)
- return false;
-
- if ((*step)++, ep_square() != SQ_NONE && relative_rank(sideToMove, ep_square()) != RANK_6)
- return false;
-
- if ((*step)++, testKingCount)
- if ( std::count(board, board + SQUARE_NB, W_KING) != 1
- || std::count(board, board + SQUARE_NB, B_KING) != 1)
- return false;
-
- if ((*step)++, testKingCapture)
- if (attackers_to(king_square(~sideToMove)) & pieces(sideToMove))
- return false;
-
- if ((*step)++, testBitboards)