mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Properly indent evaluate_king()
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
b95b1a9705
commit
7488d216fd
1 changed files with 94 additions and 95 deletions
|
@ -708,7 +708,7 @@ namespace {
|
||||||
Bitboard undefended, attackedByOthers, escapeSquares, occ, b, b1, b2, safe;
|
Bitboard undefended, attackedByOthers, escapeSquares, occ, b, b1, b2, safe;
|
||||||
Square from, to;
|
Square from, to;
|
||||||
bool sente;
|
bool sente;
|
||||||
int attackUnits, count, shelter = 0;
|
int attackUnits, shelter = 0;
|
||||||
const Square ksq = pos.king_square(Us);
|
const Square ksq = pos.king_square(Us);
|
||||||
|
|
||||||
// King shelter
|
// King shelter
|
||||||
|
@ -743,7 +743,7 @@ namespace {
|
||||||
attackUnits = Min(25, (ei.kingAttackersCount[Them] * ei.kingAttackersWeight[Them]) / 2)
|
attackUnits = Min(25, (ei.kingAttackersCount[Them] * ei.kingAttackersWeight[Them]) / 2)
|
||||||
+ 3 * (ei.kingAdjacentZoneAttacksCount[Them] + count_1s_max_15<HasPopCnt>(undefended))
|
+ 3 * (ei.kingAdjacentZoneAttacksCount[Them] + count_1s_max_15<HasPopCnt>(undefended))
|
||||||
+ InitKingDanger[relative_square(Us, ksq)]
|
+ InitKingDanger[relative_square(Us, ksq)]
|
||||||
- (shelter >> 5);
|
- shelter / 32;
|
||||||
|
|
||||||
// Analyse safe queen contact checks
|
// Analyse safe queen contact checks
|
||||||
b = undefended & ei.attacked_by(Them, QUEEN) & ~pos.pieces_of_color(Them);
|
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
|
// The bitboard b now contains the squares available for safe queen
|
||||||
// contact checks.
|
// contact checks.
|
||||||
count = count_1s_max_15<HasPopCnt>(b);
|
attackUnits += QueenContactCheckBonus * count_1s_max_15<HasPopCnt>(b) * (sente ? 2 : 1);
|
||||||
attackUnits += QueenContactCheckBonus * count * (sente ? 2 : 1);
|
|
||||||
|
|
||||||
// Is there a mate threat?
|
// Is there a mate threat?
|
||||||
if (QueenContactMates && !pos.is_check())
|
if (QueenContactMates && !pos.is_check())
|
||||||
|
|
Loading…
Add table
Reference in a new issue