1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 19:49:14 +00:00

Merge cosmetics from Glaurung 2.2

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2008-12-21 17:02:34 +01:00
parent 31d4f0b734
commit 61c6a3d5a0
2 changed files with 3 additions and 5 deletions

View file

@ -637,7 +637,6 @@ namespace {
void evaluate_rook(const Position &p, Square s, Color us, EvalInfo &ei) { void evaluate_rook(const Position &p, Square s, Color us, EvalInfo &ei) {
//Bitboard b = p.rook_attacks(s);
Bitboard b = rook_attacks_bb(s, p.occupied_squares() & ~p.rooks_and_queens(us)); Bitboard b = rook_attacks_bb(s, p.occupied_squares() & ~p.rooks_and_queens(us));
ei.attackedBy[us][ROOK] |= b; ei.attackedBy[us][ROOK] |= b;
@ -768,14 +767,14 @@ namespace {
Bitboard occ = p.occupied_squares(), b, b2; Bitboard occ = p.occupied_squares(), b, b2;
// Initialize the 'attackUnits' variable, which is used later on as an // Initialize the 'attackUnits' variable, which is used later on as an
// index to the SafetyTable[] array. The initial is based on the number // index to the SafetyTable[] array. The initial value is based on the
// and types of the attacking pieces, the number of attacked and // number and types of the attacking pieces, the number of attacked and
// undefended squares around the king, the square of the king, and the // undefended squares around the king, the square of the king, and the
// quality of the pawn shelter. // quality of the pawn shelter.
int attackUnits = int attackUnits =
Min((ei.kingAttackersCount[them] * ei.kingAttackersWeight[them]) / 2, 25) Min((ei.kingAttackersCount[them] * ei.kingAttackersWeight[them]) / 2, 25)
+ (ei.kingAdjacentZoneAttacksCount[them] + count_1s_max_15(undefended)) * 3 + (ei.kingAdjacentZoneAttacksCount[them] + count_1s_max_15(undefended)) * 3
+ InitKingDanger[relative_square(us, s)] - shelter / 32; + InitKingDanger[relative_square(us, s)] - (shelter >> 5);
// Analyse safe queen contact checks // Analyse safe queen contact checks
b = undefended & ei.attacked_by(them, QUEEN) & ~p.pieces_of_color(them); b = undefended & ei.attacked_by(them, QUEEN) & ~p.pieces_of_color(them);

View file

@ -25,7 +25,6 @@
//// Includes //// Includes
//// ////
#include "types.h"
#include "depth.h" #include "depth.h"
#include "history.h" #include "history.h"
#include "lock.h" #include "lock.h"