mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Convert RookOn7thBonus and QueenOn7thBonus to be Score
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -145,10 +145,8 @@ namespace {
|
|||||||
const Value UnstoppablePawnValue = Value(0x500);
|
const Value UnstoppablePawnValue = Value(0x500);
|
||||||
|
|
||||||
// Rooks and queens on the 7th rank (modified by Joona Kiiski)
|
// Rooks and queens on the 7th rank (modified by Joona Kiiski)
|
||||||
const Value MidgameRookOn7thBonus = Value(47);
|
const Score RookOn7thBonus = Score(47, 98);
|
||||||
const Value EndgameRookOn7thBonus = Value(98);
|
const Score QueenOn7thBonus = Score(27, 54);
|
||||||
const Value MidgameQueenOn7thBonus = Value(27);
|
|
||||||
const Value EndgameQueenOn7thBonus = Value(54);
|
|
||||||
|
|
||||||
// Rooks on open files (modified by Joona Kiiski)
|
// Rooks on open files (modified by Joona Kiiski)
|
||||||
const Value RookOpenFileBonus = Value(43);
|
const Value RookOpenFileBonus = Value(43);
|
||||||
@@ -645,8 +643,7 @@ namespace {
|
|||||||
if ( relative_rank(Us, s) == RANK_7
|
if ( relative_rank(Us, s) == RANK_7
|
||||||
&& relative_rank(Us, pos.king_square(Them)) == RANK_8)
|
&& relative_rank(Us, pos.king_square(Them)) == RANK_8)
|
||||||
{
|
{
|
||||||
ei.value += Sign[Us] * (Piece == ROOK ? Score(MidgameRookOn7thBonus, EndgameRookOn7thBonus)
|
ei.value += Sign[Us] * (Piece == ROOK ? RookOn7thBonus : QueenOn7thBonus);
|
||||||
: Score(MidgameQueenOn7thBonus, EndgameQueenOn7thBonus));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user