mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Helper functions to count material for both sides
Syntactic sugar: helper functions to count material or pieces for both sides. No functional change Closes #1025
This commit is contained in:
@@ -643,7 +643,7 @@ namespace {
|
||||
// Step 4a. Tablebase probe
|
||||
if (!rootNode && TB::Cardinality)
|
||||
{
|
||||
int piecesCount = pos.count<ALL_PIECES>(WHITE) + pos.count<ALL_PIECES>(BLACK);
|
||||
int piecesCount = pos.count<ALL_PIECES>();
|
||||
|
||||
if ( piecesCount <= TB::Cardinality
|
||||
&& (piecesCount < TB::Cardinality || depth >= TB::ProbeDepth)
|
||||
@@ -900,7 +900,7 @@ moves_loop: // When in check search starts from here
|
||||
{
|
||||
if ( !captureOrPromotion
|
||||
&& !givesCheck
|
||||
&& (!pos.advanced_pawn_push(move) || pos.non_pawn_material(WHITE) + pos.non_pawn_material(BLACK) >= 5000))
|
||||
&& (!pos.advanced_pawn_push(move) || pos.non_pawn_material() >= 5000))
|
||||
{
|
||||
// Move count based pruning
|
||||
if (moveCountPruning)
|
||||
|
||||
Reference in New Issue
Block a user