- int dummy, *step = failedStep ? failedStep : &dummy;
-
- // What features of the position should be verified?
- const bool all = false;
-
- const bool testBitboards = all || false;
- const bool testKingCount = all || false;
- const bool testKingCapture = all || false;
- const bool testState = all || false;
- const bool testCheckerCount = all || false;
- const bool testPieceCounts = all || false;
- const bool testPieceList = all || false;
- const bool testCastlingSquares = all || false;
-
- if (*step = 1, sideToMove != WHITE && sideToMove != BLACK)
- return false;
-
- 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;