No functional change and small speed increase.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
int bonus;
Value mgValue = Value(0);
Value egValue = Value(0);
int bonus;
Value mgValue = Value(0);
Value egValue = Value(0);
- Bitboard pawns = ourPawns;
+ const Square* ptr = pos.piece_list_begin(Us, PAWN);
// Initialize pawn storm scores by giving bonuses for open files
for (File f = FILE_A; f <= FILE_H; f++)
// Initialize pawn storm scores by giving bonuses for open files
for (File f = FILE_A; f <= FILE_H; f++)
}
// Loop through all pawns of the current color and score each pawn
}
// Loop through all pawns of the current color and score each pawn
+ while ((s = *ptr++) != SQ_NONE)
- s = pop_1st_bit(&pawns);
f = square_file(s);
r = square_rank(s);
f = square_file(s);
r = square_rank(s);
mgValue += CandidateMidgameBonus[relative_rank(Us, s)];
egValue += CandidateEndgameBonus[relative_rank(Us, s)];
}
mgValue += CandidateMidgameBonus[relative_rank(Us, s)];
egValue += CandidateEndgameBonus[relative_rank(Us, s)];
}
return Values(mgValue, egValue);
}
return Values(mgValue, egValue);
}