- assert(pos.non_pawn_material(strongerSide) == QueenValueMg);
- assert(pos.count<QUEEN>(strongerSide) == 1);
- assert(pos.count< PAWN>(strongerSide) == 0);
- assert(pos.count< ROOK>(weakerSide ) == 1);
- assert(pos.count< PAWN>(weakerSide ) >= 1);
-
- Square kingSq = pos.king_square(weakerSide);
- Square rsq = pos.list<ROOK>(weakerSide)[0];
-
- if ( relative_rank(weakerSide, kingSq) <= RANK_2
- && relative_rank(weakerSide, pos.king_square(strongerSide)) >= RANK_4
- && (pos.pieces(weakerSide, ROOK) & rank_bb(relative_rank(weakerSide, RANK_3)))
- && (pos.pieces(weakerSide, PAWN) & rank_bb(relative_rank(weakerSide, RANK_2)))
- && (pos.attacks_from<KING>(kingSq) & pos.pieces(weakerSide, PAWN))
- && (pos.attacks_from<PAWN>(rsq, strongerSide) & pos.pieces(weakerSide, PAWN)))
+ assert(verify_material(pos, strongSide, QueenValueMg, 0));
+ assert(pos.count<ROOK>(weakSide) == 1);
+ assert(pos.count<PAWN>(weakSide) >= 1);
+
+ Square kingSq = pos.king_square(weakSide);
+ Square rsq = pos.list<ROOK>(weakSide)[0];
+
+ if ( relative_rank(weakSide, kingSq) <= RANK_2
+ && relative_rank(weakSide, pos.king_square(strongSide)) >= RANK_4
+ && relative_rank(weakSide, rsq) == RANK_3
+ && ( pos.pieces(weakSide, PAWN)
+ & pos.attacks_from<KING>(kingSq)
+ & pos.attacks_from<PAWN>(rsq, strongSide)))