mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Properly indent evaluate_king()
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -708,7 +708,7 @@ namespace {
|
||||
Bitboard undefended, attackedByOthers, escapeSquares, occ, b, b1, b2, safe;
|
||||
Square from, to;
|
||||
bool sente;
|
||||
int attackUnits, count, shelter = 0;
|
||||
int attackUnits, shelter = 0;
|
||||
const Square ksq = pos.king_square(Us);
|
||||
|
||||
// King shelter
|
||||
@@ -743,7 +743,7 @@ namespace {
|
||||
attackUnits = Min(25, (ei.kingAttackersCount[Them] * ei.kingAttackersWeight[Them]) / 2)
|
||||
+ 3 * (ei.kingAdjacentZoneAttacksCount[Them] + count_1s_max_15<HasPopCnt>(undefended))
|
||||
+ InitKingDanger[relative_square(Us, ksq)]
|
||||
- (shelter >> 5);
|
||||
- shelter / 32;
|
||||
|
||||
// Analyse safe queen contact checks
|
||||
b = undefended & ei.attacked_by(Them, QUEEN) & ~pos.pieces_of_color(Them);
|
||||
@@ -760,8 +760,7 @@ namespace {
|
||||
{
|
||||
// The bitboard b now contains the squares available for safe queen
|
||||
// contact checks.
|
||||
count = count_1s_max_15<HasPopCnt>(b);
|
||||
attackUnits += QueenContactCheckBonus * count * (sente ? 2 : 1);
|
||||
attackUnits += QueenContactCheckBonus * count_1s_max_15<HasPopCnt>(b) * (sente ? 2 : 1);
|
||||
|
||||
// Is there a mate threat?
|
||||
if (QueenContactMates && !pos.is_check())
|
||||
|
||||
Reference in New Issue
Block a user