Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool is_insufficient_material_draw(const libchess::Position & pos)
- {
- if (pos.piece_type_bb(libchess::constants::PAWN, libchess::constants::WHITE).popcount() ||
- pos.piece_type_bb(libchess::constants::PAWN, libchess::constants::WHITE).popcount() ||
- pos.piece_type_bb(libchess::constants::ROOK, libchess::constants::WHITE).popcount() ||
- pos.piece_type_bb(libchess::constants::ROOK, libchess::constants::WHITE).popcount() ||
- pos.piece_type_bb(libchess::constants::QUEEN, libchess::constants::WHITE).popcount() ||
- pos.piece_type_bb(libchess::constants::QUEEN, libchess::constants::WHITE).popcount())
- return false;
- if (pos.piece_type_bb(libchess::constants::KNIGHT, libchess::constants::WHITE).popcount() ||
- pos.piece_type_bb(libchess::constants::KNIGHT, libchess::constants::WHITE).popcount() ||
- pos.piece_type_bb(libchess::constants::BISHOP, libchess::constants::WHITE).popcount() ||
- pos.piece_type_bb(libchess::constants::BISHOP, libchess::constants::WHITE).popcount())
- return false;
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement