position.inCheck();
position.inCheck(Color::Blue);
position.checkers(Color::Blue);
position.pinnedPieces(Color::Blue);
position.givesCheck(move);
position.checked_opponents_after(move);MoveList<> moves;
movegen::generateMoves(position, moves);
movegen::generateCaptures(position, moves);
movegen::generateEvasions(position, moves);
movegen::is_pseudo_legal(position, move);
movegen::is_legal(position, move);
movegen::has_legal_move(position);
movegen::isCheckmate(position);
movegen::isStalemate(position);StateInfo state;
position.doMove(move, state);
position.undoMove(move, state);if (position.canDoNullMove()) {
StateInfo state;
position.doNullMove(state);
// Search reduced null-move branch.
position.undoNullMove(state);
}Null-move pruning belongs in the search layer. Do not use it while in check, and add zugzwang safeguards before relying on it competitively.
attacks::set_slider_backend(attacks::SliderBackend::RayScan);
if (magic::available()) {
magic::enable();
}const std::uint64_t nodes = movegen::perft(position, 4);Perft is included for move-generation verification, not as the final search implementation.