mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 11:39:15 +00:00
Convert RookOn7thBonus and QueenOn7thBonus to be Score
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
e9757f7610
commit
444c7c5183
1 changed files with 3 additions and 6 deletions
|
@ -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));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue