mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 08:13:08 +00:00
Introduce and use SCORE_ZERO
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
4419924fcf
commit
5bed82cd4e
4 changed files with 6 additions and 5 deletions
|
@ -634,7 +634,7 @@ namespace {
|
|||
const Color Them = (Us == WHITE ? BLACK : WHITE);
|
||||
|
||||
Bitboard b;
|
||||
Score bonus = make_score(0, 0);
|
||||
Score bonus = SCORE_ZERO;
|
||||
|
||||
// Enemy pieces not defended by a pawn and under our attack
|
||||
Bitboard weakEnemies = pos.pieces_of_color(Them)
|
||||
|
|
|
@ -185,7 +185,7 @@ Score PawnInfoTable::evaluate_pawns(const Position& pos, Bitboard ourPawns,
|
|||
Rank r;
|
||||
int bonus;
|
||||
bool passed, isolated, doubled, opposed, chain, backward, candidate;
|
||||
Score value = make_score(0, 0);
|
||||
Score value = SCORE_ZERO;
|
||||
const Square* ptr = pos.piece_list_begin(Us, PAWN);
|
||||
|
||||
// Initialize pawn storm scores by giving bonuses for open files
|
||||
|
|
|
@ -1658,7 +1658,7 @@ Key Position::compute_material_key() const {
|
|||
/// updated by do_move and undo_move when the program is running in debug mode.
|
||||
Score Position::compute_value() const {
|
||||
|
||||
Score result = make_score(0, 0);
|
||||
Score result = SCORE_ZERO;
|
||||
Bitboard b;
|
||||
Square s;
|
||||
|
||||
|
|
|
@ -68,8 +68,9 @@ enum ScaleFactor {
|
|||
// Compiler is free to choose the enum type as long as can keep
|
||||
// its data, so ensure Score to be an integer type.
|
||||
enum Score {
|
||||
ENSURE_32_BITS_SIZE_P = (1 << 16),
|
||||
ENSURE_32_BITS_SIZE_N = -(1 << 16)
|
||||
SCORE_ZERO = 0,
|
||||
SCORE_ENSURE_32_BITS_SIZE_P = (1 << 16),
|
||||
SCORE_ENSURE_32_BITS_SIZE_N = -(1 << 16)
|
||||
};
|
||||
|
||||
ENABLE_OPERATORS_ON(Score);
|
||||
|
|
Loading…
Add table
Reference in a new issue